[clang] [clang-format] treat continuation as indent for aligned lines (PR #191217)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 13:08:35 PDT 2026


================
@@ -1114,12 +1114,13 @@ void BreakableLineCommentSection::adaptStartOfLine(
     // token, even if LineColumn is the same as the original column of the
     // token. This is because WhitespaceManager doesn't align trailing
     // comments if they are untouchable.
-    Whitespaces.replaceWhitespace(*Tokens[LineIndex],
-                                  /*Newlines=*/1,
-                                  /*Spaces=*/LineColumn,
-                                  /*StartOfTokenColumn=*/LineColumn,
-                                  /*IsAligned=*/tokenAt(0).NewlinesBefore == 0,
-                                  /*InPPDirective=*/false);
+    Whitespaces.replaceWhitespace(
+        *Tokens[LineIndex],
+        /*Newlines=*/1,
+        /*Spaces=*/LineColumn,
+        /*StartOfTokenColumn=*/LineColumn,
+        /*IsAligned=*/nullptr, // tokenAt(0).NewlinesBefore == 0,
----------------
HazardyKnusperkeks wrote:

What about here? Apparently all tests pass.

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


More information about the cfe-commits mailing list