Issue |
157654
|
Summary |
[clang-format] Possible regression in clang-format-22?
|
Labels |
clang-format
|
Assignees |
|
Reporter |
prj-
|
I'm not sure which version is right, and which version is wrong. What do you think?
```console
$ cat foo.c
static int foo(bool bar)
{
return bar ? 0 : 1;
}
$ clang-format --style=file:clang-format.txt foo.c
static int foo(bool bar)
{
return bar ? 0 : 1;
}
$ clang-format --version
clang-format version 21.1.0
$ clang-format-22 --style=file:clang-format.txt foo.c
static int foo(bool bar)
{ return bar ? 0 : 1; }
$ clang-format-22 --version
Debian clang-format version 22.0.0 (++20250908112350+a80c393a9c49-1~exp1~20250908112511.1692)
```
The faulty line is the first one from `clang-format.txt`, if it's commented out, then `clang-format-22` formats the same as `clang-format-21`.
[clang-format.txt](https://github.com/user-attachments/files/22233436/clang-format.txt)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs