.clang-format file compatible with clang-format 18#1490
.clang-format file compatible with clang-format 18#1490leekillough wants to merge 1 commit intosstsimulator:develfrom
Conversation
|
CLANG-FORMAT TEST - FAILED (on last commit): |
|
I can't comment on the specific changes in the
In the meantime, I symlink newer versions of LLVM binaries selectively into a folder that's on my PATH when I'm working in the SST tree. |
|
I have a .clang-format file that gave essentially the same results for v18 and v20, but never found the time to do final testing on it. Let me compare that file to what you have here. If we can find one that generally works for both, then I don’t have an issue with updating the file. However, we won’t be testing it against both versions, so will only officially support v20. As far as getting clang-format20, my experience with clang-format has been that it’s entirely independent of the rest of the clang suite if you can get it in binary form. You can simply copy the binary into your path without needing any of the rest of the binaries. Though finding the binaries pre-compiled for specific OS versions can sometimes be tricky. |
Every time I start with a clean So I very used to using this It's a minor nuisance to have to use an altered |
|
Can't we use GitHub Actions and remove the |
The formatting is controlled by the first Actions will not substitute for running |
On Ubuntu 24.04 LTS, the default
clang-formatversion is 18.This PR is draft and advisory. I suggest you consider something like it, to make the
.clang-formatfile compatible with more versions.I use this
.clang-formaton my Ubuntu 24.04 LTS machine, since installingclang-format20 may require installing other Clang/LLVM binaries which will mess up the whole Clang/LLVM tree, and lead to a "discordant" installation, where a mixture of different versions of different tools may fail to interact correctly.It's unfortunate that
clang-formatdoes not allow aversionspecifier in the.clang-formatfile, so that it behaves according to a certainclang-formatversion, and requires aclang-formatof that version or later. If only they learned from, say, Perl, where you canuse v1.2.3;to specify a specific version.@berquist @feldergast @gvoskuilen