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

    <tr>
        <th>Summary</th>
        <td>
            Designated initializers prevent formatting under certain conditions
        </td>
    </tr>

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

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

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

<pre>
    The last line in the following code is not formatted under certain conditions:

```c
typedef struct {
 struct {
        int y1;
        struct {
            int z1, z2;
        } y2;
    } x;
} S;
S s = { .x = { 0, { 0, 0, }, }, };
```

I was looking for output similar to this (typedef omitted):

```c
S s = {
    .x = {
        0,
        {
 0,
            0,
        },
 },
};
```

Adding designated initializers for all relevant fields only creates more visual noise, and removing all designated initializers results in the expected formatting aside from the lack of designated initializers.

I have narrowed the issue down to the following style options (pseudocode) in all currently predefined styles:

```
if (!ColumnLimit) {
  // formatted
} else if (!Cpp11BracedListStyle) {
 // not formatted
} else if (BreakBeforeBinaryOperators == "All") {
 // not formatted
} else {
  // formatted
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVN2OqzgMfppwY50KQunPBRfTU1Va6Uh7MfsCgZjinZCgxLTDPP0q9L-z1dmtqoLd-LP9-XNUCLS3iKUoNqLYJmrg1vmyw85jY7DmpHJ6LP9qEYwKDIYsAlngFqFxxrgj2T3UTiNQAOsYGuc7xYwaBqvRQ42eFVmondXE5GwQ-ZtItyK9_C7S07c-2Tz2qLGBwH6oGcRyc_J_d5w_ZBnGTORP7lfHLyFfmZA_4Ut-CxTLLYyP7uj6vHqi9X613iGAyLcxEcw-r69pRL--nK3t0-OKeOHgnpg_4KgCGOc-IseN8-AG7geGQB0Z5YEdcEsBhFxdSHMdRe6FXP-G5buqb23eyn9kJFb_zNHlyPf_XkVsb75747c8vGkdCdAYpaqissgSkzL0hT5MxChjwKPBg7IMDaHRAZw1I9QeFWOAznmEA4VBGbCOAsYJKKvBY-cOET5CvErhMQyGw0X4-NljHQ-dtT6FB9IIjXfddMSo-gNc8wpx9jjnVh0QrPLeHVFP8RTCgKDd0Z6mfL9tgUeD4PppmeLw-4CDdnEJhVzHImMv9eA9WjYj9D5KgyzqU-jLBTyZ1ERMIbOfzgyd_UUdccS9U4WQOyF3t1W_rQWagHBD6Pss23hVo_5Fgd9j9keoM9LDxfGvaBuP6mODjfO4Iav8-GePXrHzk4wn1Ur5ZoyQ8n9n-C-dPVGV6DLX63ytEiyzxSorsjTLVklb5nlV6WKdp-uiWOFyXijM0qyQ86Jp1tVSJlTKVObpPJtLma7y1axWaa7W88V8uVyoelmJeYqdIjMz5tDNnN8nkxjKhcyKNDGqQhOm61pKi8eTUmLXxTbxZYz5UQ37IOapocDhhsLEBsvtC4n3Hg9o-V7Sr-7vZPCmbJn7SUgTYXvidqhmteuE3MWM58eP3ru_sWYhd1OdQcjd1Mc_AQAA___6Tuav">