https://bugs.llvm.org/show_bug.cgi?id=40741

            Bug ID: 40741
           Summary: Strange 2D array formatting with
                    AlignAfterOpenBracket: DontAlign
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Hi,

Withe the "AlignAfterOpenBracket: DontAlign" setting, I get strange formatting
of a two dimensional array. Doing this:

    > clang-format -style="{AlignAfterOpenBracket: DontAlign}"
    int arr[2][2] = { { 1234, 5678, }, { 9876, 4321, } };

Results in:

    int arr[2][2] = {{
                        1234,
                        5678,
                    },
        {
            9876,
            4321,
        }};

I'm assuming this is not expected. Apologies if this is a duplicate, I have
found some other opens issues related to AlignAfterOpenBracket, but I'm not
sure whether they have the same root cause.

Thanks,
Benbuck

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to