| Issue |
61494
|
| Summary |
git-clang-format-## in LLVM's clang-format-## deb packages do not call the right clang-format version
|
| Labels |
|
| Assignees |
|
| Reporter |
bhennion
|
To reproduce:
1. install `clang-format-15` on Ubuntu 20.04 (same with 16, I did not test older versions)
2. Call `git clang-format-15 --diff $SOME_COMMIT`
The resulting patch is wrong (for instance, it does not take into account the option `AllowShortBlocksOnASingleLine: Empty`).
The reason is this (from `git-clang-format-15`):
```
p.add_argument('--binary',
default=config.get('clangformat.binary', 'clang-format'),
help='path to clang-format'),
```
The default binary is `clang-format` instead of `clang-format-15`, thus resulting, on my machine (actually an Azure pipeline) in calling clang-format 11 instead of 15.
As a workaround, one could call `git clang-format-15 --binary=clang-format-15 --diff $SOME_COMMIT`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs