<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/82087>82087</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[feature request] clang-format: insert symmetric braces
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
timblechmann
</td>
</tr>
</table>
<pre>
Qt's coding style recommends "symmetric" braces in `if` statements:
```
// Wrong
if (address.isEmpty())
qDebug("empty!");
else {
qDebug("%s", qPrintable(address));
it;
}
// Correct
if (address.isEmpty()) {
qDebug("empty!");
} else {
qDebug("%s", qPrintable(address));
it;
}
```
it would be great if `InsertBraces` could be used to enforce this style
https://wiki.qt.io/Qt_Coding_Style#Braces
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0U8Fu2zgQ_ZrRhYhAjWyLPuiQRGtgbxvsYY8BRY5kbikxJkcN_PeFaLtxCrTopQJBYog3M3rD93RKbpyJWtg-wbYr9MLHEFt2U-_JHCc9z0Uf7Ll9YcAmCROsm0eR-OxJRDJhmmi2SQBiOk8TcXQGEEUftaEk3CxgJ90AOykSa6aJZk5QP4LsQN72nbyuHArAA-BB_BfDPF6v3CAAlbY2UkqlS39Nb3wGVID7dV1Ap476Zcy3SBdABYgroH66YsgnEtDcwvW7TwPcpnw8i9M_0c2se08fna_t6vt0xx8xNN09sRuT5xAjGf4tLr_4uZ9xgqb7kdcf4fT5mS67Y_EeFm9FT2KMpDnT28m_50SRn7IK1sc3N9CSyAoOguYhREOCjy5d5HRf9sj8lmWSB_juvrjyxKULgIcXfn3OInz9N2dhfelS2La2-3qvC2qrRqqqrpXaFMfW1I3CwW5QN6ZCa5U1KKtqV1Ff76nCwrUocSOxamRVK7kpqaetUjtCrMxQKQsbSZN2vvT-61SGOBYupYVahVI1hdc9-ZQNhGi8nseHIcRJ8zr0bVfEdk176JcxwUZ6lzh9FGLHPptvIM1LXD11WigxbDvxqVb9KFyeqfjus6vJiiX69vPARsfHpS9NmAAPa6_r8fAWw_-rEvGQGSTAQybxLQAA__-BXS6L">