<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112225>112225</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-fomat does not remove multiple line breaks within a statement
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Terve16
</td>
</tr>
</table>
<pre>
If I have a statement that has multiple line breaks, clang-format does not remove them. E.g.:
Original:
```
int c
= a + b;
```
Desired Output:
` int c = a + b;`
But it does not remove them. I can add as many line breaks as I want and they remain. It only works with a single line break.
I know this is really bad formatting, but it should be valid C code. Therefore I would expect clang-format to fix this.
I have searched for options to change this behavior, but I did not find anything.
I use clang format versions 18.1.3 and 14.0.6.
Is this behavior a bug or expected? If it has to be like this - what is the reason and is there a way to change it?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0lM-O-jgMx58mvVhUbfoHOPQwDIvU0-8yL5A2bpMlJChxy_D2q7RdLYxmJQTC6df--hO7IgQ9WsSGVSdWnRMxkXK--UI_Y14nnZPPph2gBSVmBAGBBOENLQEpQaBEgNtkSN8NgtEWofMoroHxT-iNsONucP4mCKTDANYReLy5GYEU3lL4Kx1TVnwAy84s-_jj9aitMKz4WAOszrbP8he0Jei3ozUCAKw4gwDGT9Cx4vSrcP0-Y9AeJfyZ6D7RaxFYM_9M9S4_TQT6_xppoRcWhJQQgQj7fIURYy08hCUQVkbFM6qFtim0BM6aJzycvwZ4aFIRsrbjG890tdDC1boHkNIBdACPwpgndELCSpm0HSP5brUalJuMhA5hFkZL-ITeSUzhS6HHwXmMrpZH8PuOPb3fGDkY9PdSLH3lsI1CQOF7hUtpcHfSzoao6ZWwI64eO1Ri1s7_66kFqeUCb9BWgrBPUtqOP9JPAVcnW1cwow9L-vyQ5mmxQMzLNEvrd2V4rwoCumkE57f2ULLiAu0Q0cS5JRfRGH3d3O7gEUdaxzQY4QZnl1prxMfxf4jnS5OaWHFJZFPIY3EUCTb5nh-OPDvsi0Q1Yi_3x7KqMT_Wsq6zrsrLYhgOVb0fjn1RJ7rhGS_zLC_zqtxXRdoNmA1CdjjkRVZizcosjolJjZlvqfNjokOYsMlzznmVGNGhCcvmcm7xAcsp4zwusm-iaNdNY2BlZnSg8F8a0mSw-dyu-7f9_G2pl_HU9vUtkEzeNIroHuI-8Qvjl1GTmrq0dzfGL7Hi9rO7e_c39sT4ZfEZGL9sjcwN_ycAAP__4odzgw">