[clang] [clang-format] Skip alignArrayInitializers() for 1-row matrices (PR #72166)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 14 15:28:21 PST 2023


================
@@ -20875,13 +20875,15 @@ TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) {
                "};",
                Style);
   // TODO: Fix the indentations below when this option is fully functional.
+#if 0
----------------
owenca wrote:

Because it's wrong as the TODO comment says.

This patch doesn't fix it and would format it as:
```
int a[][] = {
    {
     {0, 2}, //
        {1, 2}  //
    }
};
```
Nevertheless, I just changed it to what it ought to look like.

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


More information about the cfe-commits mailing list