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: unassignedclangb...@nondot.org Reporter: l...@alexander.shukaev.name CC: djas...@google.com, kli...@google.com, llvm-bugs@lists.llvm.org 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 llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs