blob: a55831d462a1a691ebc8b44c6485ae1a9176affb [file] [log] [blame]
// RUN: clang -parse-ast-check %s
void f (int z) {
while (z) {
default: z--; // expected-error {{statement not in switch}}
}
}
void foo(int X) {
switch (X) {
case 42: ; // expected-error {{previous case value}}
case 5000000000LL: // expected-warning {{overflow}}
case 42: // expected-error {{duplicate case value}}
;
}
}
void test3(void) {
switch (0);
}