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

    <tr>
        <th>Summary</th>
        <td>
            clang-format AlignArrayOfStructures has bad behavior on None
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

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

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

<pre>
    `AlignArrayOfStructures: None` behaves bizarrely, doing more "alignment" IMO than Left or Right does.

None:
```
const std::vector<Vertex> vertices = { { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f } },
                                     { { 0.5f, -0.5f }, { 0.0f, 1.0f, 0.0f } },
                                     { { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f } },
                                     { { -0.5f, 0.5f }, { 1.0f, 1.0f, 1.0f } } };
```

Left:
```
const std::vector<Vertex> vertices = {
    { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f } },
    { { 0.5f, -0.5f },  { 0.0f, 1.0f, 0.0f } },
    { { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f } },
    { { -0.5f, 0.5f },  { 1.0f, 1.0f, 1.0f } }
};
```

Expected behavior (but not possible with current clang-format, as far as I can tell):
```
const std::vector<Vertex> vertices = {
    { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f } },
    { { 0.5f, -0.5f }, { 0.0f, 1.0f, 0.0f } },
    { { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f } },
    { { -0.5f, 0.5f }, { 1.0f, 1.0f, 1.0f } }
};
```

Additionally, in my actual setup where I use tabs, the alignment is totally broken.
For some reason it tries to use a mix of tabs and spaces to do the alignment, and gets it completely wrong. Not sure what it's expecting this tab to align with, but `tabSize` is set to 4 in my config.

<img width="1005" height="306" alt="Image" src="https://github.com/user-attachments/assets/e25b6869-f4d4-4b33-8189-e1d8e56bfa48" />

So, all three possible options for this setting are producing undesireable results.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzUVktv3DYQ_jXcy2AXFLV6HXRYPxYw0CZADPTOx0hiS5ELcuRHfn1B7SZxgtptER9awwu-ht_HmY-aoUzJjh6xZ9UVq242cqEpxP6WJuk_LTRhHEI0GxXMc89qfnB29IcY5fPH4Z7iommJmFh5gA_BI6s5KJzkAyZQ9rOMEd0zE9dggvUjzCEiMCFkBpnRExMC7n79CJkMfsGBIET4ZMeJwARMO8YPjB9W5DL3WM0v__ygg08EiUxeKg8PqClEVl7_hpHwiZW38ICRrMYErLwB1lx9_W35rhrysdYOsOYmD_JKsePrAn_R5vWLDeMH-Cd_X4he5fmCX7wvz2s0L-l-gmb7Gk_xgzsveVa78uoH9Rg_ZL3fQ9aLF-8l7pva_Qvx3kebN0P_t7HPsX0l-rdPJ9SE5vy92hCBiVYtBD4QnEJKVjmER0sT6CVG9ATaST9uhxBnSZlJJhhkzM0daOmB0Dkmuv-bpv8pSX9C0YMxlmzw0p1zrvUwP4PUtEgHCWk5weOEEeEOloRAUqVsRhPC14QMNgEFyhCgYvgDfc7BxxAhhRkhokzBgyWgaDGbrlASZvsEYVgxQXoD6ST1ed2E7xnWi-MNjEgpA-kwnxwSumd4jMGPO_gQCNISER4nSWCJiSYBrtc1FxGa8hmlyuAr6npJM2y-vazmJNW9_bzWIpuy49lyfwmHDn6w46WwsPLaziM8WkMTK2-YEAXnVS5KE-YidJ4reZ2npLuM72Y5Yp5JUZ9nJqJTroFMHJk4jpamRe10mJk4LgnjVhJJPWXvExNHmRKuHRSVqtu62w57s9_uVVlu26LttliYFqtaDXLfZp4MW96ej3wf1gA6BzRFxG9fajhl7RMMIZ5DlJDWeMmIcIrBLDqPFm8w2Ygy74mYFkdptzF9abqykxvsi6YSRdeUJd9MfatUI5Wsq6LTraibQtRNo1WnaqELzfXG9oKLijdFwQvRVnyHoik73ZqqaLuuqA3bc5yldTvnHuZdiOPGprRgX-xb3tUbJxW6tL49hPg-v4j8Gol93rdVy5jYnjubKH1DIksO-5e74K-fJzDJBEq-yHXBr--VzRJd_4Z6merSbE8x_I6amDiuHmQBL0489OLPAAAA__9F0oa5">