blob: 8559e0dee3965ac19e0e5ffe5bea4e3fcdff0619 [file] [log] [blame]
Chris Lattner8a87e572007-07-23 17:05:23 +00001// RUN: clang -parse-ast-check %s
2
Chris Lattner8a87e572007-07-23 17:05:23 +00003void f (int z) {
4 while (z) {
5 default: z--; // expected-error {{statement not in switch}}
6 }
7}
8
Chris Lattnerf4021e72007-08-23 05:46:52 +00009void foo(int X) {
10 switch (X) {
11 case 5000000000LL: // expected-warning {{overflow}}
12 case 42:
13 ;
14 }
15}
16