Issue 239166
Summary [clang-format] Single-line enum wrapping with `ColumnLimit: 0`
Labels clang-format
Assignees
Reporter figuld
    On this config value, single line enums, with >= 2 elements, unexpectedly wrap, with the next elements being aligned with the first.

Does not happen at ColumnLimit = 90.
Using `clang-format version 23.1.3`, same issue on `21.1.8`,  `19.1.7`.

Minimal config
```
IndentWidth: 4
BreakBeforeBraces: Linux

ColumnLimit: 0
```

Input, also output with ColumnLimit = 90
```c
int main()
{
    enum { WINDOW_WIDTH = 1080, WINDOW_HEIGHT = 720 };
}
```

Incorrect output with ColumnLimit = 0
```c
int main()
{
    enum { WINDOW_WIDTH = 1080,
 WINDOW_HEIGHT = 720 };
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to