https://llvm.org/bugs/show_bug.cgi?id=25971
Bug ID: 25971
Summary: Formatting is not idempotent with
'MaxEmptyLinesToKeep' being 0
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Created attachment 15535
--> https://llvm.org/bugs/attachment.cgi?id=15535&action=edit
Test C++ code for formatting
1. $ clang-format -dump-config -style=LLVM | sed
's/\(MaxEmptyLinesToKeep\s*:\s*\).*/\10/g' > .clang-format
2. $ clang-format test.cpp
3. $ clang-format test.cpp | clang-format
4. $ clang-format test.cpp | clang-format | clang-format
5. $ clang-format test.cpp | clang-format | clang-format | clang-format
Notice how the output of #2 is identical to #4, while #3 is identical to #5,
and the difference between those two variants is the added/removed empty line
before 'private:'. That is this interleaving pattern of adding/removing this
empty line will repeat infinitely.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs