<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58121>58121</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] `AllowShortBlocksOnASingleLine` is not working as documented
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Mode-77
</td>
</tr>
</table>
<pre>
**Problem**
`Always` option does not work as documented.
**Version**
`>clang-format --version`
`clang-format version 14.0.0 (https://github.com/llvm/llvm-project 3f43d803382d57e3fc010ca19833077d1023e9c9)`
**How to replicate**
The example input text is straight from the documentation example for `AllowShortBlocksOnASingleLine`.
*In:*
```c
while (true) {
}
while (true) {
continue;
}
```
*Expected:*
```c
while (true) {}
while (true) { continue; }
```
`clang-format -style="{Language: Cpp, AllowShortBlocksOnASingleLine: Always}" example.c`
*Actual:*
```c
while (true) {}
while (true) {
continue;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytU8lu2zAQ_RrqQljgYms56GDHCVogRQuk6J2iRhIbWhREKk7-viPFahwXyAJUIMRlZh7fvOGUrnoqiNji-DG40sLheUPYnrAtSdjWHtWTxwV1fTCuo5UDTzsX6NEN91R5PNDjAboAVXyKev7POL9g8Bh1AUrktbaqa1a1Gw4q0NXq4eSHtsXplcfJTvk6ZjGjRGRtCL0nEnFvcDQmtGMZa4f8b6x9WKZVP7jfoAOV9VpWGZMyE9UmBVlrxplWPM-kZGlacSYk5DonIn8hcZbIF3ekwdEBemu0CnCe0c8WKDyqQ2-Bmq4fAw3wGKjx1IdBmaYNtB7cgQb0W9RSs5hLFGZJZ7GtO961bgg76_S9_95t70zXWLg1HaD9UuCv3SzAmbDz0M_7Y2sQGqUKw4h8c0rS3SuAdP-eI8VPuy6YDg1ydxH398ILWtePPUoO1afJvUXonAd9h8LF41n58GQxbk-EQKRbNI2qwYMtvep7Iq7o28Kj36kN0gliqVqs_019q8Oo7H9NfKnEB-oQQcGTZJ0xLhIeVYWscpmrKJhgoSCb3bkqZLP_yJObXvHS7Xj-uuGjcbDF5xoRt8b7ETwuNhkXPGqLClSd1zUHLqHSeVIlaTm1aJokdZIpFllVgvVTBih_B0c6Q0zV3OwjUwgmBGdMcrFO1yyWOdcbVAGUSjUvc7JmcFDGxhOP2A1NNBQzpXJsPBqt8cG_GJX3pulgFmzCV2NAeYpvroJVmkbz1cVM_Q9teoiR">