[clang] [clang-format] Break trailing comment alignment at non-trailing comments (PR #208324)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 18 00:01:21 PDT 2026


================
@@ -1155,7 +1183,9 @@ void WhitespaceManager::alignTrailingComments() {
     BreakBeforeNext = (I == 0) || (C.NewlinesBefore > 1) ||
                       // Never start a sequence with a comment at the beginning
                       // of the line.
-                      (C.NewlinesBefore == 1 && StartOfSequence == I);
+                      (C.NewlinesBefore == 1 && StartOfSequence == I) ||
+                      BreakAfterTrailingComment;
+    BreakAfterTrailingComment = false;
----------------
owenca wrote:

Undo.

https://github.com/llvm/llvm-project/pull/208324


More information about the cfe-commits mailing list