[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

Ben Dunkin via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 11 11:48:37 PDT 2025


================
@@ -118,9 +118,9 @@ const tooling::Replacements &WhitespaceManager::generateReplacements() {
     alignConsecutiveTableGenDefinitions();
   }
   alignChainedConditionals();
+  alignArrayInitializers();
----------------
bdunkin wrote:

Aligning elements in arrays can changed the length of a line, so we must do it before trailing comments and escaped newlines, otherwise they will not be working with the final length of the line.

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


More information about the cfe-commits mailing list