Typz added a comment.
It is explicitly documented in google style guide:
https://google.github.io/styleguide/cppguide.html#Loops_and_Switch_Statements :
> case blocks in switch statements can have curly braces or not, depending on
> your preference. If you do include curly braces they should be placed as
> shown below.
>
> If not conditional on an enumerated value, switch statements should always
> have a default case (in the case of an enumerated value, the compiler will
> warn you if any values are not handled). If the default case should never
> execute, simply assert:
>
> switch (var) {
> case 0: { // 2 space indent
> ... // 4 space indent
> break;
> }
> case 1: {
> ...
> break;
> }
> default: {
> assert(false);
> }
> }
So IMHO we cannot just change the current (or default) behaviour.
Repository:
rC Clang
https://reviews.llvm.org/D43183
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits