<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62067>62067</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] BraceWrapping.AfterEnum overrides AllowShortEnumsOnASingleLine
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alexhenrie
</td>
</tr>
</table>
<pre>
I am using clang-format 15.0.7.
Config file:
```
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: true
BraceWrapping:
AfterEnum: true
AfterFunction: true
BreakBeforeBraces: Custom
```
Input code (copied from [the documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#allowshortenumsonasingleline))
```
enum { A, B } myEnum;
int main() { return 0; }
```
Expected output: No change
Actual output:
```
enum
{
A,
B
} myEnum;
int main() { return 0; }
```
I believe that it is a bug for `AfterEnum: true` to affect `AllowShortEnumsOnASingleLine: true` because `AfterFunction: true` does not affect `AllowShortFunctionsOnASingleLine: true`.
This may be related to issue #60475.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VE2P4zYM_TXyhRhDlmMnOfgQJ2tggKJ7mAI9yzJtq5UlQ6Jmd_59IWc2O9ndzvRSQJA_SD5Sj3qUIejJIjasall1yWSk2flGGvw6o_Uas94NL80jyAVi0HYCZaSdHkbnF0lQVDnP9znjF8ZP1_3s7KgnGLVBVp7eWljNX9f2eTLGfXmanadPNi7hsz09aTsZ_E3bFAnkI_7o2UWrSDv7nnfrpcI_vVxXbadbCXAaCX3KdO8NV8M34B-hUP7d4ug8bqghmc8xkFt-eaTr_mjXSKDcgMDEQblV4wCjdwuwqqUZYXAqLmhJbhmrCxOHmWhN6Ex0THQbx7kxz0vu_MRENzgVmOjO6X-3Uf9ELwY_rxsZ-UyLYaKUiaeQeMLEqLMybByZxJE4pvXv7UghwPYtnJg4Qwtsf4Hl5UpY-zZOW4JFasvEgYnjFuKRorfAWbnFvcPNp68rKsIBXKQ1UuLzdwdqlnbCt34nRVGa714fFP5q2Le3pjJxfn3_Vvz_cp5H6NFofEagWRJoAh1AQh8nGJ0HVvOf713NgRzIcURFm8d_EULNoUclY8Ab6E93tuYwOAxgHf0S_gP11PxOyH_MOsAiX6BH8Ghk6ho50CHEdLHLmu_2VZ4NTTkcy6PMsCnqQyHEgR95Njd1yStVVaIfK7kb1FiUOAyFKLGoS9FXItON4KLku6Ioqt2h4HlVFkJIWYy7fqgHeWA7jovU5iaEbMvd1ILX-8zIHk3Y5pYQFr9cC2NCpDHmmxTz0McpsB03OlD4jkKazDbw3o4yVl3gbnLkt8aBe0bv9YAB3mtVFr1p7nU8aZpjnyu3MNGl_K-Ph9W7v1ARE91WddL2dqp_AgAA___uF7RD">