<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58468>58468</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Format] Rhs of `^` with list-initialization breaks formatting
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JohelEGP
</td>
</tr>
</table>
<pre>
No `.clang-format`.
Input and expected output:
```C++
num operator^(exp r) const { return mp{*this} ^ mp{r}; }
```
Actual output:
```C++
num operator^(exp r) const {
return mp{*this} ^ mp { r };
}
```
Using parentheses works as expected:
```C++
num operator^(exp r) const { return mp{*this} ^ mp(r); }
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1ks2OnDAMx58mXKxBIRAGDjnM7OxW7aGqKvUBAngg25CgfHTbPn2TYbcfUrWnVrJI_o6Nf7Y82OmbeG-BtLQctTTz4WrdKkPWhF4IPe3ft2aLAaSZAL9uOAacwMaQfKR-jkgZu90Rds5285q4gt3QyWAd4feEdSkfHGE9jNb4AOR4BochOgPrlgRhp7AoT44XSPG7zyVF6jPk489avyOexhCl_ndYeyS8Trfzww74XPFVyk9emRk26dCEBT16eLLuswfpf072_4-UdTn87yMtUFRt21Yd73lXTKKe-rqXRVBBoyD8_LDvB7_Ax8WDvebVyRgthScVFtDKh4MyKiip1XcZlDUwOJSpx321QhpAEZ0WSwibz82yh2RzSo5DOdo1Ca2_vByHzdnHNJcklfcRfbrwrmm7YhHVgKw6DpRO48hw6hhFHBm_1kPix7EutBxQ-4ydgAslGGWsolVf1YzzY9k2bVMNvOlk3VcTnUhDcZVKl7lwad1cOHFjGOLs02Puzf96lN6r2SC-_F_GsFgn3tkF9f2bD8WNV9xgfwCwn_2A">