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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Operands of ternary expressions shouldn't get aligned with `AlignOperands: DontAlign`.
        </td>
    </tr>

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

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

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

<pre>
    ### Environment

The tested v19 clang-format executable was built from latest source of 13.03.2024. Also tested with clang-format 17.0.3.

Setting in .clang-format is:
```
Language: Cpp
AlignOperands: DontAlign
BreakBeforeTernaryOperators: false
ColumnLimit: 30
UseTab: Never
```
### Problem
```
void function() {
  int a{}, b{}, cccccccccc{},
 d{}, e{};
  int i = a ? b :
      cccccccccc ? d :
 e;
}
```
formats to:
```
void function() {
  int a{}, b{}, cccccccccc{},
      d{}, e{};
  int i = a      ? b :
 cccccccccc ? d :
                   e;
}
```
We don't expect all the spaces between the `a` and `?`.
The help of AlignOperands says that operands of ternary expressions shouldn't get aligned with `AlignOperands: DontAlign`. Please correct me if I interpret this wrong.
We tried to turned off all alignment in our settings (for easier repo case those settings were not added here), so we don't expect anything to be aligned. That's why we found this.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VV-PozYQ_zTOy2gR2IHAAw_ZTSNVOvVO6lb3bPAAbo2N7CG5fPvKkE02ve21LzeyEnv-_8aeQYage4tYs_yZ5YeNnGlwvn457A1-k1ah_7ppnLrUjIt1wS_2pL2zI1pi6YGl-_X3dUAgDIQKTlkFrZG2f-qcHyUBfsN2JtkYhLMM0MzaEHTejWBktIHgZt8iuA4ykaQi4SnfJrA3wb35PGsaHp1muyRNRPI-h9-RSNsetIXkQVcHJq46rEivazl-krafZY9M7OFlmlbm3ujefp7QS6uiJRycpYW5yp89yr-esXMeX9Fb6S-LMjm_aHfSBFw1X5yZR_tJj5qiRFyj_hHwVTaR8xue0H-Y2b3iX7xrDI4fap2cVtDNtiXtLOMl4xWw3fMqBNCWQMbz7sD4CzT3bXujG-9qpO5KeN2KB4camDiABCaO0MCtsrDQ3e8iV-_kePMTfX6EZr2uAOT-7b5-At6F_jfohf6J_Aegv6f_LsNXBBXR7WLrTNgSSGOABoQwyRYDNEhnRLuwWJFKVqQgrYp7Jo6sSJN7Uw5opthZD48agrwEoEESuDeW64DW1xyjegxBOxsgDG42as2mx5hKnBjXjmRF-oNmKdIEvhiUAaF13kcgI4Lu4NdYUvSTRwIadICzd7ZPbujJa1RADmj2MZbruqUES-w4eWKLu9lDWDs-AONl5zygDBo9eJwctDEuDS7gXe2MHsE6AqkUKhjQI-NVvPXg4Px92e2FhjhRyEGDb9ATeB0kMb4LcB4u0axzs1ULkmSjaqEqUckN1tkuS0uRV0W1Geo0S8tGYaMqKbddlXeiLZXkWYa7ohU53-g6jr1UZFVaZnxbJV2Wi2xbNqpo87wsKrZNcZTaJMacxsT5fqNDmLEu812ebYxs0IRlkHP-fvoxzuNo93U0e2rmPrBtanSgcHdEmszyEXgwzA_w-ae-js3sTT0QTct85kfGj72mYW6S1o2MH2N-17-nybs_sSXGjwvqwPhxAf53AAAA__83JAl6">