diff options
Diffstat (limited to 'test/SemaCXX/switch-implicit-fallthrough.cpp')
-rw-r--r-- | test/SemaCXX/switch-implicit-fallthrough.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/switch-implicit-fallthrough.cpp b/test/SemaCXX/switch-implicit-fallthrough.cpp index 912b21ebfd..bc94c9e750 100644 --- a/test/SemaCXX/switch-implicit-fallthrough.cpp +++ b/test/SemaCXX/switch-implicit-fallthrough.cpp @@ -172,6 +172,11 @@ int fallthrough_macro1(int n) { return n; } +void fallthrough_cfgblock_with_null_successor(int x) { + (x && "") ? (void)(0) : (void)(1); + switch (x) {} +} + int fallthrough_position(int n) { switch (n) { [[clang::fallthrough]]; // expected-warning{{fallthrough annotation in unreachable code}} |