<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57539>57539</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format mispairs braces that enclose `#if 0`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
owenca
</td>
</tr>
</table>
<pre>
Versions: at least since 10.0.1
```
$ cat test.cpp
do {
#if 0
if (a) {
#else
if (b) {
#endif
}
} while (0);
$ clang-format test.cpp
do {
#if 0
if (a) {
#else
if (b) {
#endif
}
}
while (0)
;
```
Expected output: same input
Related to #57509.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9ksGOnDAMhp8mXKJFIQEChxx2NO0D9NB7AANZBYJw6LZvXwMz7aDeKyKw49_h8w9N6H6Z77CiCzMy9c5t5B4sRo5uboFnIhVpxsSdiXdWisc6U5nzluQRMKbtspy7XeBM354K5Xr-kHNOMZOVZbK-SMAjXCXNP5K5c_1Tw_T9UdB3_jk6D3uPoB6mbi9o3s7DWx_W6b8zvhKewRXzOcgf3KuxX34u0EboeNjissX9q6CdgLt5z86O4_4NvN11keaRqtCFqNOzkoDJylJmFV1F0hnV1aq2SXTRg7k4MzlcrFuRN6ttAXkcaRPm1gckYEJ6-FOKZFu9GWNc9v-Eya-0BhfHrUnbMFHi_Y_n421ZwwfNQKlD3AApIDxVJ6MptGqaCnpdtlrnRd41Mgery1zKvsqlSrxtyG7DihuT8pWVUlbcE2ekkFLUQokiE1mRAh3Wgqj6CkB05G8uYLLOpztKGtYhWc1B1WwDUtE7jPi3aBHdMAMcb6Tz7RbHsJrwSS7Y5OA3B_xvjSLitg">