[clang] [clang-format] Align trailing comments for function parameters (PR #164458)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 28 07:10:27 PDT 2025


================
@@ -650,8 +650,16 @@ static unsigned AlignTokens(const FormatStyle &Style, F &&Matches,
     MatchedIndices.push_back(I);
   }
 
+  // Pass to the function entire lines, so it can update the state of all tokens
+  // that move.
   EndOfSequence = I;
+  while (EndOfSequence < Changes.size() &&
+         Changes[EndOfSequence].NewlinesBefore == 0) {
+    ++EndOfSequence;
----------------
sstwcw wrote:

I didn't see that part last time.  The variable is not visible here.  Should I move it out of the loop?

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


More information about the cfe-commits mailing list