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

via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 31 22:22:42 PDT 2025


================
@@ -22118,11 +22133,14 @@ TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) {
 
   verifyFormat(
       "test demo[] = {\n"
-      "    { 7,    23,\n"
-      "     \"hello world i am a very long line that really, in any\"\n"
-      "     \"just world, ought to be split over multiple lines\"},\n"
-      "    {-1, 93463,                                  \"world\"},\n"
-      "    {56,     5,                                     \"!!\"}\n"
+      "    {\n"
+      "        7,\n"
+      "        23,\n"
+      "        \"hello world i am a very long line that really, in any\"\n"
+      "        \"just world, ought to be split over multiple lines\"\n"
+      "    },\n"
----------------
owenca wrote:

This is worse than before IMO.

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


More information about the cfe-commits mailing list