[clang-format] Single-line enum wrapping with `ColumnLimit: 0`
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
int main()
{
enum { WINDOW_WIDTH = 1080, WINDOW_HEIGHT = 720 };
}
Incorrect output with ColumnLimit = 0
int main()
{
enum { WINDOW_WIDTH = 1080,
WINDOW_HEIGHT = 720 };
}
@llvm/issue-subscribers-clang-format
Author: figuld
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
int main()
{
enum { WINDOW_WIDTH = 1080, WINDOW_HEIGHT = 720 };
}
Incorrect output with ColumnLimit = 0
int main()
{
enum { WINDOW_WIDTH = 1080,
WINDOW_HEIGHT = 720 };
}
hi i'm investigating this issue. i'll try reproducing it on main and add a regression test alongside a fix if i can figure out what's going on!