diff options
Diffstat (limited to 'test/Sema/switch.c')
-rw-r--r-- | test/Sema/switch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Sema/switch.c b/test/Sema/switch.c index bb48229..4e39e0f 100644 --- a/test/Sema/switch.c +++ b/test/Sema/switch.c @@ -50,12 +50,14 @@ void test4() } switch (cond) { - case g() && 0: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}} + case g() && 0: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}} \ + expected-warning {{use of logical && with constant operand}} break; } switch (cond) { - case 0 ... g() || 1: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}} + case 0 ... g() || 1: // expected-error {{expression is not an integer constant expression}} // expected-note {{subexpression not valid in an integer constant expression}} \\ + expected-warning {{use of logical || with constant operand}} break; } } |