<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57250>57250</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
AlignAfterOpenBracket: BlockIndent splits cast operator in a non-standard way
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bradlitterell
</td>
</tr>
</table>
<pre>
With clang-format version 14.0.5
`AlignAfterOpenBracket:BlockIndent` splits a cast operator in a non-standard way:
Example:
The default "Align" style leaves this unchanged:
```console
$ clang-format -i -style="{BasedOnStyle: LLVM, AlignAfterOpenBracket: Align}" testfmt.c
int foo(void) {
int x = (int)(100000 + 200000 + 100000 + 200000 + 100000 + 200000 + 100000 +
200000 + 100000 + 200000 + 100000 + 200000 + 100000 + 200000 +
100000 + 200000 + 100000 + 200000);
int y = 100000 + 200000 + 100000 + 200000 + 100000 + 200000 + 100000 +
200000 + 100000 + 200000 + 100000 + 200000 + 100000 + 200000 +
100000 + 200000 + 100000 + 200000;
}
```
BlockIndent produces this:
```console
$ clang-format -i -style="{BasedOnStyle: LLVM, AlignAfterOpenBracket: BlockIndent }" testfmt.c
int foo(void) {
int x = (int
)(100000 + 200000 + 100000 + 200000 + 100000 + 200000 + 100000 + 200000 +
100000 + 200000 + 100000 + 200000 + 100000 + 200000 + 100000 + 200000 +
100000 + 200000);
int y = 100000 + 200000 + 100000 + 200000 + 100000 + 200000 + 100000 +
200000 + 100000 + 200000 + 100000 + 200000 + 100000 + 200000 +
100000 + 200000 + 100000 + 200000;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztVU2PmzAQ_TXmMgoiJnwdOCRNV6q01R5atWeDh-CuY0fYZDf_vgMkSiKlUrTt7qkWwvYbmJk3vMGVlYfyp_It1FqYzayx3VZ42GPnlDUwX4RRmLBozaLl8Z5GS602Ztl47J52aFadqJ_Rs3i50rZ-_mIkGk9Pgdtp5R0IqIXzYHfYCW87UIYgY83MeWGk6CS8iAO9fRnk86vY7jQSChPwvUWQ2Ihee2CcjxnQDM4fNIJGsUcHvlUOelO3RATl2WUaTVdtjbPkdUL54pryTMFsdMfiNblm2WolHMon820Cl_D4-OMr45_gT_wnA8uG18Gj883Wh_UUThkPjbWM53urJOMFUIDJBDAYX4HiErecNmSmxTwaBkEr4Ofl29BTpOvx124v0NsR7nQwEI6vynEYy_GeJXhP8vfSPnEeNHOt1ctuuOgr2HVW9vVR7Of--GilX6Z0W_Bvkf0R__fyv_mpPj7Af5nflnmA5TxNo4KnWZ4GsoxlERci8MprLO_S4PGsueOkCfpOl633u6F7GH-ga0PHX1-Ftd3SRuv9aZpRs_3Cmn7HD8q5Hh0tkownUdCWeb5I44rXIuNVjlWVNPVCFk3TiKZoRBUHWlSoXcmSFTWHwRcYXQztlqwDVfKI8yifF_M0jqM0TOdFk2ZSJkklMWkytohwK5QOhzxC222CrhxTqvqNI6NWzruzUThHRUIcw5F_0fvWdmXVCUl1odKh1sGYQDkS-A2NLgEX">