<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57805>57805</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format wraps trailing comment when inserting/removing braces
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format,
regression
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
owenca
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
owenca
</td>
</tr>
</table>
<pre>
Version: main
```
$ cat test.cpp
if (a) //
return b;
$ clang-format -style="{InsertBraces: true, RemoveBracesLLVM: true}" test.cpp
if (a)
//
return b;
```
Expected output: same as input
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFkk1v3CAQhn8NvqC1WPDngUO220iV0ksPuYM9tqkwWICT5t938G7a5FBVQhrNOzA874D245t8hhCNd0Q80FUZR9iVsAfSsPu6pbyig0o0QUzlsG031UyU8E4R3mN8zOuQKQ2Q9uCoJuLy4bxVbj5NPqzY6BTTmwUiroRz0l6-uQghXYIaIGaQFHYg_Av9Aat_gZv-9PT8_U-tzQf_ifPO8T-qzya__tpgSDBSv6dtT_muqFagKlLjUChAnptGVJ0QvC9GKcZe9KpIJlmQn9y9BrVFBFXGGjfTwa8rOJQXcNgqW0UZyUK2l3fow2GxByuXlLY8gxv7bNKy6xI7YGLty3s4bcH_RFpMTYw7To0_1m3H6mKRotFn1U-TGEdW9XrUQ8N5M_b1WbdcqK6wSoONktQXHOJH8PwYOHUMAeYA8fgXqNXXwkjOOGf9uWNNxVlXVqKahrZtJ1bzXlQVqRjg_7Flxit9mIsgD1K9zxGL1sQU_xYVNp8dwJ3Cv4Ib1P0utafFB3nTisOfPMz9BrOK0fM">