You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running clang-format should ideally idempotent, i.e. if I run it,
then run it again, the results of the first and second run should
be identical.
This is currently not the case in the following example:
-- 8< --
int test() {
int foobar = 0; /* comment /
int foo = 0; / comment /
int bar = 0; / this is a multiline comment
and the later vars are shorter /
int qux = 0; / comment */
}
-- 8< --
After running clang-format --style=LLVM on this, you get this:
-- 8< --
int test() {
int foobar = 0; /* comment /
int foo = 0; / comment /
int bar = 0; / this is a multiline comment
and the later vars are shorter /
int qux = 0; / comment */
}
-- 8< --
Each run, the line before variable qux gets a little bit less indented. After enough, the process finally stabilizes at this version:
-- 8< --
int test() {
int foobar = 0; /* comment /
int foo = 0; / comment /
int bar = 0; / this is a multiline comment
and the later vars are shorter /
int qux = 0; / comment */
}
-- 8< --
I am using clang SVN revision 205521, llvm rev 205525, on Mac OS X 10.8.5.
The text was updated successfully, but these errors were encountered:
Extended Description
Running clang-format should ideally idempotent, i.e. if I run it,
then run it again, the results of the first and second run should
be identical.
This is currently not the case in the following example:
-- 8< --
int test() {
int foobar = 0; /* comment /
int foo = 0; / comment /
int bar = 0; / this is a multiline comment
and the later vars are shorter /
int qux = 0; / comment */
}
-- 8< --
After running clang-format --style=LLVM on this, you get this:
-- 8< --
int test() {
int foobar = 0; /* comment /
int foo = 0; / comment /
int bar = 0; / this is a multiline comment
and the later vars are shorter /
int qux = 0; / comment */
}
-- 8< --
Each run, the line before variable qux gets a little bit less indented. After enough, the process finally stabilizes at this version:
-- 8< --
int test() {
int foobar = 0; /* comment /
int foo = 0; / comment /
int bar = 0; / this is a multiline comment
and the later vars are shorter /
int qux = 0; / comment */
}
-- 8< --
I am using clang SVN revision 205521, llvm rev 205525, on Mac OS X 10.8.5.
The text was updated successfully, but these errors were encountered: