diff options
Diffstat (limited to 'clang/test/Analysis/casts.c')
-rw-r--r-- | clang/test/Analysis/casts.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/casts.c b/clang/test/Analysis/casts.c index 86fb7da58ec..88bdc55908e 100644 --- a/clang/test/Analysis/casts.c +++ b/clang/test/Analysis/casts.c @@ -182,3 +182,9 @@ void testLocNonLocSymbolRemainder(int a, int *b) { c += 1; } } + +void testSwitchWithSizeofs() { + switch (sizeof(char) == 1) { // expected-warning{{switch condition has boolean value}} + case sizeof(char):; // no-crash + } +} |