<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/152267>152267</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format doesn't change ragged indentation of ternary expression containing braced initializers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jacobsa
</td>
</tr>
</table>
<pre>
If I provide this input, clang-format doesn't change it:
```c++
void Foo() {
const std::optional o =
some_condition ?
std::optional<Foo>{
some_arg,
} : std::nullopt;
}
```
Ideally it would be formatted something like this:
```c++
void Foo() {
const std::optional o =
some_condition
? std::optional<Foo>{
some_arg,
}
: std::nullopt;
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0Ustu3DAM_Br6QmThlfzIHnxIsjWQryhkibaVaiVDordNv76QnSLbB4r2UIKAAZoz9IxHpWQnT9RB_Qj1uVArzyF2L0qHIaliCOa1ex7xGZcYrtYQ8mwTWr-sDOIJtVN-uhtDvChGEyh5EC2jnpWfCC2DfIBy66bcW4N4zF0-XIM12IcA4h7ECaHNQ0QdfGJMbDJWPoSFbfDKYUCQ521jrxQu9FEHb2xeQJB9fvkLDuRTviE_fOf_TW1UKk4gnm5XoD0jyBtOvzoXFgaZmaA93-raZT4bUs69omX8HFZncCDc3WEy2x2erZ_Q2U-7lf_DoB-duVEEsv9Hg35yZtf8TveX3hSmk-YkT6qg7tjWVdU0bXss5q5u65M2FR1HMpW5p2aslamlrE8tHY2mwnaiFHV5XzZlW4v6eKjGZqTTSLqiUo6koCrpoqw7OHe9HEKcCpvSSt2xFqJpC6cGcmkLtxC3YQUhctxjl3F3wzolqEpnE6d3JrbsqPtzxKOaJjJovSHPaktiGJEpehVfkb4skVLKUx08K-vzzx-i0hvGslXOfqWYijW6bmZetkCIHkQ_WZ7X4aDDBUSfv-ntcbfE8EKaQfSb1ASif1N77cS3AAAA___WHSTN">