We've tried to beautify our code a bit with clang-format tool.
In order to get unified result on all machines we've done clang-format --style=llvm --dump-config
, which has been tuned a bit and stored into repo.
The issue is that clang 10 and 9 seem to provide us with different output for exactly the same code. I've seen changes in comments alignment only so far, but it still breaks the whole idea of getting code style consistent. Another issue is that clang 9 is unable to parse some settings dumped from v10.
Is there any way to insure consistent formatting across multiple versions of clang-format?
clang-format
has some connection to a compiler toolchain, but can be and is often used as a standalone tool (e.g. while still using MSVC and/or GCC to build binaries). Just like.editorconfig
should yield the same behavior across editors/IDEs of various versions, that would also be my expectation of.clang-format
. I can understand that the Clang folks do not want to carry backward compatibility around (their codebase doesn't for the most part), but it's still annoying. – Effeminate