<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55483>55483</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format]: nested array of structures alignment
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          igagis
      </td>
    </tr>
</table>

<pre>
    # input

`.clang-format`:
```yaml
---
AlignArrayOfStructures: Right
ColumnLimit: '120'
ContinuationIndentWidth: '1'
IndentWidth: '1'
Language: Cpp
Standard: Latest
TabWidth: '1'
UseCRLF: 'false'
UseTab: ForContinuationAndIndentation

...
```

`main.cpp`:
```cpp
type expected = {
        { 
                "1",
                {
                        {"1", 1, 2},
                        {"1", 11, 6}
                }
        },
        {
                "13",
                {
                        {"13", 13, 0},
                        {"13", 132, 3},
                        {"13", 133, 5}
                }
        },
        {
                "14",
                {
                        {"14", 14, 1}
                }
        },
        {
                "15",
                {
                        {"15", 15, 4}
                }
        }
};
```

# result after formatting

```cpp
type expected = {
                                { "1",                                                                                                                                                                        {{"1", 1, 2}, {"1", 11, 6}}},
                                {"13", {{"13", 13, 0}, {"13", 132, 3}, {"13", 133, 5}}},
                                {"14",                                                                                                                                                                                                                {{"14", 14, 1}}},
                                {"15",                                                                                                                                                                                                                {{"15", 15, 4}}}
};
```
The formatted result makes no sense.

# proposal

Proposal is to format nested array of structures as in input file above.
I.e. if an array has another array as one of it's elements, then this array is formatted as one element per line.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VtuOmzAQ_RryYgVxcwgPPGQTRVopUqvdrfpswAG3xkbYbJu_75hLQkg2abStZBl7ZnzmeHJgksjsEFuej5ioGm05G8tZ9fPCsVNORD7fy7okGvaWf_J140BK3pnm83m3WHGWi1Vdk8OX_auum1Q3NVVwFL2wvOhTrCVvSrFjJdPGY3mh6zkwD16hmWiIZlI8i4wK_Z1luhgij3G3fDtg3pCcGse6qjrjqyYiI3VmjDuiqerpvJHkOso3Rdcvu21v3xOu6NgH54xrK-sx5ZXIOmbtblxT27YnBZxUvCRM2CnQvVbsdLiGPlQU0d8VTTXNkOVvkBU-DUgRrNFpA8Pz4EKe5a3PrOMTR8sxFLlm8qxwMz13EdhGLkzkGfxoOwGZZAYo_wF-_pDXN7Nzi-EptH34fxfb4uJP3Sd44D7BkDjoyv6ZvPiBvHjIi80c3MnbrWHhP01UeaZg-JDAy95wjche0xp1nw54M_KJ0B9T9Ig6Gss5-tSADB9KHn0o8m5cyuhCSSf8q5JFN0V66T3J8i6D4N_U56NyXVHsXUr4_1K6IuZu3NPtW0EHkYLweu2W5CdVSEikqFDUniq8qmUlFeFj-9fehphCWvaQSECHAVhiuiGSe6SO_RARBS2367pozzhFJJHvQ65nm9qI7RER_dkCwomQuoB3qrOAQQpqQKGFeqFClNMSeo4yBYA4ARNw6YJhcbpkf7KPRxVAciaoPctiP4v8iMw005zGFn466_94Y3rdrSuZzm8wZ03N40LryrR9y9vCyJkumsROZQkbzt-HxxyK-QPeetgypRr4o-BtMQ6W_qyI3WUYEuoHXuRniyTMwihdYD9y08wPXLKIZpwklCtDFH5-QX-hFsJIAW9mLPYcz3Owi90Q-9ixqZMkS-K6i8TFyyTyrMCh0G-5bXjYss5nddxSSppcgZMzpdXJSZSC69G2LgafNLqQdcxykjM1azPHLfM_mc9Ozw">