case0:{// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
}
case1:// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
n+=100;
case3:// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
if(n>0)
n+=200;
case4:// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
if(n<0)
;
case5:// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
switch(n){
case111:
break;
case112:
break;
case113:
break;
}
case6:// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
[[clang::fallthrough]];// expected-warning{{fallthrough annotation in unreachable code}}
case221:
[[clang::fallthrough]];// expected-warning{{fallthrough annotation does not directly precede switch label}}
return1;
[[clang::fallthrough]];// expected-warning{{fallthrough annotation in unreachable code}}
case222:
[[clang::fallthrough]];// expected-warning{{fallthrough annotation does not directly precede switch label}}
n+=400;
case223:// expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
[[clang::fallthrough]];// expected-warning{{fallthrough annotation does not directly precede switch label}}