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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] FEATURE REQUEST: Newline after opening braces.
        </td>
    </tr>

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

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

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

<pre>
    If would be nice if there were a parameter to control forced newlines after opening a function body:
```cpp
void foo() {
  bar();
  if ( expression ) {
    foobar();
  }
}
```

Should result in:
```cpp
void foo() {

  bar();
  if ( expression ) {

    foobar();
  }
}
```

Working with clang-format-15, which is the first version to support inserting braces on single liner, this would be the next level to support all possibilities. Also, the newline in lambda is always removed and somewhat inconsistent already!
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytUk1v3CAQ_TX4MsrKxmY_Dj5suhupl0rNh3rGeLymwWABXif_voM3m6ZVT20lhGcG83gz7zWufa0_dzC7ybTQIFitEHQHsUePMKdNwii9HDCih-hAORu9M9A5r7AFi7PRFgPILv3gRrTanuhSN1kVtbPQ0Bus3LP8wPI9W-eXpcbxUjk73RKYY3zL-A7Y5vZSB2ikvxRZ-V4jalQDfBk9hpDgf7sECetPN9nm8EbhPbhyeUuX_aFfRkHok4mg7V8w_wf-_6uLb84_JxlmHXtQRtrTDek1yHhTCMY_wdxr1YMOSWfotA8RzugXPiRxmMbR-dR9QB8TTuOlIo3pOFBqEJLmPiHFnlDe7ZPgLL5EMHhG8xFLGgOjo5YbbXTUGFawN8FdIPBqI3oSjByaViZy0szyNZAWgzuT1aRtIbgB514mbmTEoENEm8A9SnIZLzKsi_W62uXlpuBZW5ftrtzJLOposGbi9uMsmDjA3XH_-HR_hPvj16fjwyOpDV_eqPxq6MsEVtnkTd3HOIZkDH5H60QznpqVcgMlxpyvn5vRu--oIqU6hAkDBWJbVNusr2UrlOiqolTbvKsEtpu1FLzi23Yr1m0rMiMbNCExZpzTcGCBoJhIZ7rmOedFnlfFphAFXwmCawSuKyWVLHcdq3IcpDarxGPl_Cnz9UKpmU6BDg3NLfw8lCTLyeIyoIQvp9g7X3fGeS1tg-oZfbYQqJcGfgCy7Etd">