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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Add option to insert braces only for ifs/loops whose body is longer than one line
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

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

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

<pre>
    Some style guides allow omitting braces for statements with single-line bodies, for example: https://github.com/SerenityOS/serenity/blob/master/Documentation/CodingStyle.md#omission-of-curly-braces-from-statement-blocks

It'd be nice if the `InsertBraces` setting was an enum instead of a bool that could also take a `InsertForMultiline` value, which would then insert braces only for ifs/loops that have multi-line bodies (or multi-line conditionals, I suppose).

@owenca 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkk2O-zYMxU8jbwgHjmwn8cKL_CcwMIuii5xAH4ytjiwGIj1pbl_YmXamm6IbGxLEx8cfn2EOY0LsVftLtZfCLDJR7lNwVFjyz_5KMwLLMyKMS_DIYGKkB9AcREIawWbjkOFGGViM4IxJGB5BJuCQxohlDAnBkg_ISr9tL_FPM98jqvoMk8idVX1WelB6GINMi905mpUerpgxBXn-flV64K-D0oONZJUeZsOCWenhQm5Z2xoJlJQe3siHNF5X07vZK13THJgDpZJupVtyfJYv1-Ut01z-Y7u0kdwHq-qiqvPr-y5KHz1YhBQcQriBTAjqUL0nxiy_Nhl1qIDxheNhGEwCTMsMIbGg8UA3MGCJIshkBBwt0YOJTCDmA8F86w2Uf1uihBXZqvpp4oIrtMcU3ASPrVImTKs2ZvmbPqX43MCGGys9RKI7v5pN5hNhXjV_7gGUPlH-ee8o-bDyM3Hb0jvwcr8To9Ld7icR1VT0wOQMFL6vfVd3psB-fzjWVb3v2qaY-kp3-nToKrvv0Nf-VDet17o-nmxt2oOzReh1petqXx32XdW2zW5vanus3L5pW6wb61RT4WxC3MX4Oe8oj0VgXrBvu9OhKaKxGHmLrNYumjSWN8qzEaX1GuLcr2WlXUZWTRUDC38LSZC4xf1fhe0Fzt4D3VcEIPR_-D4m4g3oEwJDpDRiXqEnoISwUi2WHPv_CPhq6utX3jP9gU6UHrZR1zbbtH8FAAD__xdFOjo">