diff options
Diffstat (limited to 'test/Sema/statements.c')
-rw-r--r-- | test/Sema/statements.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/Sema/statements.c b/test/Sema/statements.c index 6da2daa01ac23..e3c41f3e1aaf3 100644 --- a/test/Sema/statements.c +++ b/test/Sema/statements.c @@ -13,7 +13,7 @@ int test(int _x) { // PR2374 int test2() { return ({L:5;}); } -int test3() { return ({ {5;} }); } // expected-error {{incompatible type returning 'void', expected 'int'}}\ +int test3() { return ({ {5;} }); } // expected-error {{returning 'void' from a function with incompatible result type 'int'}}\ // expected-warning {{expression result unused}} int test4() { return ({ ({5;}); }); } int test5() { return ({L1: L2: L3: 5;}); } @@ -41,3 +41,13 @@ void test11(int bit) { { } } + +// rdar://3271964 +enum Numbers { kOne, kTwo, kThree, kFour}; +int test12(enum Numbers num) { + switch (num == kOne) {// expected-warning {{switch condition has boolean value}} + default: + case kThree: + break; + } +}
\ No newline at end of file |