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

    <tr>
        <th>Summary</th>
        <td>
            clang-format feature request: Ability to force the use of braces after an if statement
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          robertankeney
      </td>
    </tr>
</table>

<pre>
    Ability to force the use of braces after an if statement, much like the clang-tidy readability-braces-around-statements option without needing to have a compilation database in place. This seems like a reasonable option for clang-format as it can be considered a style preference.
For example:
```
if (x < 3)
    y = y * 2;
```
would become
```
if (x < 3)
{
    y = y * 2;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydUl2OmzAQPo15GSUiJhB44CHZKCfoBcZ4CO4am9pms9y-E9ht1apS1SILxmPm-xmP8nppz8pYkxZIHnofOoI0EMyRwPegAnYUAftEAdCB6SEmTDSSS0K-wDh3A1jzuhV1Ft19l4xeIBBq3IB3G8gOg5-d3v2oj-CnZLyDh0mDnxM4Im3c_SlkwDcChM6Pk7G4_qUxoUKWZRxMlhH38GUwESLRGDcN-KSN3qGy9AnOlj50cTRiAoxgEnRsRrFi76LRFEhzcUwL102Bek44JhD5VeTnGyPQO46TJVGct5yo8o-1brktQtbvIIoXKIRstizws3Du-nzLM0hRXP5Y_vCz1SyH7dI_4IvT5a9Ep-tvgJluC90UDWbJJEvtL73pCdMciNv4baaY2C7873Rkc7DtkNIUn02TN153vudZ7dklb6x9-_zspuC_UscDdTMxMjEH5VHKQza0-oQ1VXVNzUGXupNVg7UuiqI5dlWJsswsKrKxFeVFSOnoASsEx6K8ZqaVuZR5kZd5fijlad81qlZY54dDXXWqkuKY04jG7p869j7cs9CuktR8j3xoTUzx5yHGaO48pisd4-PMkxva4BWFhO6VHC3ZKqBdDXwHzgYRxA">