Closed
Description
This is a c file that is correctly formatted according to clang-format 18, but not according to clang-format 19
clang-format --dry-run --Werror --style="{BasedOnStyle: llvm, BreakBeforeBraces: Linux}" test.c
FOOBAR(switch); // if we use a word that isn't "switch" everything is fine
// if we do use "switch", the "BreakBeforeBraces: Linux" isn't respected and it
// tries to do "void foo(void) {"
void foo(void)
{
int i = 5;
printf("foo: %d\n", i);
}
I bisected it to 236b3e1 [clang-format] Handle Java switch expressions (#91112)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done