<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60475>60475</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format single-line enums AllowShortEnumsOnASingleLine and ColumnLimit = 0
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vesterij
</td>
</tr>
</table>
<pre>
I am trying to have short single line enum unchanged when ColumnLimit = 0
clang-format version 15.0.1
Config
```
Language: Cpp
AllowShortEnumsOnASingleLine: true
ColumnLimit: 0
```
Code
```
// Can this be single line?
enum class IsItWorking { Yes, No, Maybe };
```
Result
```
// Can this be single line?
enum class IsItWorking { Yes,
No,
Maybe };
```
If I set ColumnLimit to 120, enum will remain one-liner but then clang-format wont respect existing line breaks which I do not want.
I debugged the code and with this example we do not even reach the line where AllowShortEnumsOnASingleLine is used.
Is this a bug or is there some other configuration that conflicts keeping enum as a one-liner?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VEGP6yYQ_jX4MkqEsZNsDj7sZhsp0raV-g5Vj9geG95iiGCI3_77CpxNN2r6brUsjGGY-fjmm5Eh6NEiNmzzwjavhYyknG8uGAi9_l60rv9oTiAnIP-h7QjkQMkLQlDOEwRtR4NgtEVAGyeItlPSjtjDrNDCwZk42Tc9aQJWvQJn_JXx52XsjLTjanB-kgQX9EE7C-VmzdflV7ODs4Merytbfn3z75u0Y5QjsuoZDufzsvhsjJu_JXi_2DiF3-3zt4zyTdtsSD7ip-cburTBH8b4NO3x8bY4MnGEg7RASgdo8SsprDouZpmczsgQ4BRO9Kfz74lNtnuBvzAwcYDfXBp_lR8tAtu9surla_yHoP7AEA39r7AWswXcdf5fzwPoj0CfBjhBQLrTBjkoBU8EZESzNgY8TlJbcBZXCbOHNhJQUtWdcGZnCTyGM3YE-EMHSjfIimw9yvcAs9KdghP0DqwjmKWl9R0i6LGNYxItKYTO9QjS9jBrUgt7-ENOZ4Mw46cTvKAFj7JT-UwONyv0CD-TH-gAMWB_Hz4sQSS0cQTnkxFlV8FNCC7NoctFEL2kVCSkJOUlozsK8I54TpfO3Mnk6UbaLdPLWPRN1e-rvSywKbe7TVXzp_2-UM12P1Rl1z315abCelvLumqHttxhKbHrxVDoRnBRccFFKcRTuV_zWsgB90O767jkTyWreUqYWRtzmdbOj4UOIWKz5fVuUxjZogm5ywhhcYa8yYRITcc36cyqjWNgNTc6UPjHC2ky2NylfFHy6tZ1ws9JT7n8VyMqojeNIjoHVl2rZdSkYrvu3MTEMcW_flZn775jR0wcM-rAxDHf6u8AAAD__8e4odw">