-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Closed
Labels
Description
test.c containing:
static const CMD_HANDLER_T command_handlers[] =
{
{ "a", HandleA },
{ "bb", HandleBB },
{ "ccc", HandleCCC },
{ NULL, NULL },
};Command:
clang-format -style="{ SpacesInParentheses: true, AlignArrayOfStructures: Left }" test.c > test.out.cResult:
static const CMD_HANDLER_T command_handlers[] = {
{"a", HandleA },
{ "bb", HandleBB },
{ "ccc", HandleCCC},
{ NULL, NULL },
};Anomalous things:
- For the first row only, there is no space between the opening brace and the first value.
- For the row with the widest last value, there is no space between the last value and the closing brace.
I have tested this with Clang-Format v13.0.1, v15.0.7 and v16.0.0, with the same results.
8dcc