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

    <tr>
        <th>Summary</th>
        <td>
            readability-braces-around-statements doesn't work on single-line if statements
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    If I write
```
if (predicate) foo();
```
I don't get a readability-braces-around-statements warning.

If I write

```
if (predicate) {
  foo();
}
```
I do.

The documentation at https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html says that the default value 0 for `ShortStatementLines` means that braces will be added to all statements not having them already.

I wondered whether I understood the definition of the number-of-lines value for `ShortStatementLines`. I checked and in the second case I get a warning for `ShortStatementLines` set to 1, but not it's set to 2. So it seems like in my first case, the number of lines is in fact 0, and the check ought to be triggered.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU8lu3DAM_Rr7QtjwMs7EBx-SBgEC9Jb-AC3RthpZCrRkOv36Up6ZpCnSNoAAm4vI957I0crj8DDBAxycCpRVd1l1k11V57OZaoKsuX52JJVAzml6mKxlF_9l7e2Hdx5AWpM1-wAzBUBwhBJHpVU4FqNDQb5AZ6ORhQ9ccyUTPBzQGWXm8lzxVOhPbJ9EmO3PwOAjsPu7v6J-1_3bQuwSMeHDoKwBDLCE8Oyz9iZr7vkIjQxZ65e1tG5mB_0IDi-BIih5TMZC4snzz2eEKJewavB49BAWbhgSCpow6gAvqCNBxaQcMO7HxbrweLn5VRny7IWV0Jwvn5rAQWkNIwFKSRKCBWT7N-2NZWL4wvKndiuHE9Lj-7eAgzWSWGY4LMRpjt8mJo8P1soLTmXUJpWdNo-J60iusFOhE7wzg3_iL7nuphh3QiNBma2SJ8H9QaAnTjgN1nlm_qOH51zmXGfNFxhj2NiqwPPpL6GmhEfLPrZp9aDVE6W26xEmxfS2pun2G6PE78RI-ZQ6oQhQpZwEOeVtFMDGedlasPrBqXlOApa5HFrZtz3mQQVNw6cWRFryp606WMeVDXjmrmlTFngL3nLz6PTwflJnFZY4lsKubKSBPX-KZ2e_k2A57pX3kdKYdt2uu86Xoer7uml60bVErbxu2l42ONU17fpprNurXONI2g9Zd5t1d7kamqppqq7e1XVVVX1Z7a9GFFNL_W4UKOpsV9GKSr8uTO6GDcMYZ89BrTzP_2sQvVezIbrUxxj4gYen6H-uvA75hnfYwP4CWLaQEA">