-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
I'm not sure which version is right, and which version is wrong. What do you think?
$ 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
.
Metadata
Metadata
Assignees
Labels
clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!