[clang] [clang-format]: Split alignment of declarations around assignment (PR #69340)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 6 02:25:23 PST 2024


================
@@ -978,7 +978,14 @@ void WhitespaceManager::alignConsecutiveDeclarations() {
 
   AlignTokens(
       Style,
-      [](Change const &C) {
+      [&](Change const &C) {
+        if (Style.AlignConsecutiveDeclarations.AlignFunctionPointers) {
+          for (FormatToken *Prev = C.Tok->Previous; Prev; Prev = Prev->Previous)
----------------
owenca wrote:

```suggestion
          for (const auto *Prev = C.Tok->Previous; Prev; Prev = Prev->Previous)
```

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


More information about the cfe-commits mailing list