<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57803>57803</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang-format leaves an empty line when removing right 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
while (0) {
  if (a) {
    return b;
}}
return a;
$ clang-format -style="{RemoveBracesLLVM: true}" test.cpp
while (0)
  if (a)
    return b;

return a;
```
Expected output:
```
while (0)
  if (a)
    return b;
return a;
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydkj2P3CAQhn8NNGgtDP6ioLjNJtWlSXE9tsc2EQYL8G723wd7HV0uyV0RaSQz71gzz7zQuv4uX8AH7SziT2RW2iJ6QfQJVfSIR8oK0qlIIoSYdcvyUG-TNkAQayhigqD6_JAJ0cOmqj9UQjzE1VvSIn6IqL5ssZ-PonotbkONsuNpcH5O008h3g0gfkGMpb7fYHZXOHvVQXh-fvm6bRD9CltHxj5i_ZvzI8Z36N469PnHAl2Enrg1LmtMLP_87f8x3gfAIPOq4kXRCJHjXvJecKFw1NGAfGOgAXWFQJQlMC_xToy2QG4T2DQueantSLwep0ja3VS8eiOnGJewrcO-pBh1nNY269ycEmOuvz6nxbvvyYCU6hBWCOlQ1g3leJKs4JAiF0NVDE3Fyl7xnlX5kHJRc4WNasEEicpzurffgbd7Zp-SOczD6CHs7zRp5QVryShjVOQ1y6ko84z2qq1rzkXb8qbpOSoopPdssg0vc37EXu6k7TqGVDQ6xPBaVKn5aAEOCncD26ljllrj5Lx8aHjfT-7L_QSpivA6">