llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-format

<details>
<summary>Changes</summary>

When Shift is 0 there does nothing happen in the remainder of the loop, express 
that directly.

---
Full diff: https://github.com/llvm/llvm-project/pull/68154.diff


1 Files Affected:

- (modified) clang/lib/Format/WhitespaceManager.cpp (+3) 


``````````diff
diff --git a/clang/lib/Format/WhitespaceManager.cpp 
b/clang/lib/Format/WhitespaceManager.cpp
index 2cbde3da212ec65..be8eb4f60f310c9 100644
--- a/clang/lib/Format/WhitespaceManager.cpp
+++ b/clang/lib/Format/WhitespaceManager.cpp
@@ -353,6 +353,9 @@ AlignTokenSequence(const FormatStyle &Style, unsigned 
Start, unsigned End,
       }
     }
 
+    if (Shift == 0)
+      continue;
+
     // This is for function parameters that are split across multiple lines,
     // as mentioned in the ScopeStack comment.
     if (InsideNestedScope && Changes[i].NewlinesBefore > 0) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/68154
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to