The BraceWrapping of the Linux style is incorrect. This appeared in r248802 when the custom BraceWrapping options were added.
This is what r248801 looked like:
clang-format -style="{BasedOnStyle: google, BreakBeforeBraces: Linux}" ~/Desktop/format.m
void main()
{
if (blah) { stuff(); } else { more(); }
}
This is what r248802 (and trunk) looks like:
clang-format -style="{BasedOnStyle: google, BreakBeforeBraces: Linux}" ~/Desktop/format.m
void main()
{
if (blah) { stuff(); } else { more(); }
}
The behavior before r248802 is correct based on the documentation:
BS_Linux (in configuration: Linux) Like Attach, but break before braces on function, namespace and class definitions.
I changed BraceWrapping.BeforeElse to false for Linux and added and else statement to the Linux brace test.