1 // RUN: clang-cc -fsyntax-only -verify %s
5 default: z--; // expected-error {{statement not in switch}}
11 case 42: ; // expected-note {{previous case}}
12 case 5000000000LL: // expected-warning {{overflow}}
13 case 42: // expected-error {{duplicate case value}}
16 case 100 ... 99: ; // expected-warning {{empty case range}}
18 case 43: ; // expected-note {{previous case}}
19 case 43 ... 45: ; // expected-error {{duplicate case value}}
21 case 100 ... 20000:; // expected-note {{previous case}}
22 case 15000 ... 40000000:; // expected-error {{duplicate case value}}
42 case g(): // expected-error {{expression is not an integer constant expression}}
43 case 0 ... g(): // expected-error {{expression is not an integer constant expression}}
48 case 0 && g() ... 1 || g():
53 case g() && 0: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}}
58 case 0 ... g() || 1: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}}
65 default: // expected-note {{previous case defined here}}
66 default: // expected-error {{multiple default labels in one switch}}