diff options
Diffstat (limited to 'clang/test/Sema/switch.c')
| -rw-r--r-- | clang/test/Sema/switch.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/switch.c b/clang/test/Sema/switch.c index 63ffed18e31..f36ecb255f9 100644 --- a/clang/test/Sema/switch.c +++ b/clang/test/Sema/switch.c @@ -297,3 +297,11 @@ int test18() { default: return 2; // expected-warning {{default is unreachable as all enumeration values are accounted for}} } } + +int test19() { + enum { A, B } a; + switch (a) { + case 7: return 1; // expected-warning {{case value not in enumerated type}} + default: return 3; + } +} |

