summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/switch-implicit-fallthrough.cpp')
-rw-r--r--clang/test/SemaCXX/switch-implicit-fallthrough.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
index 912b21ebfdb..bc94c9e7507 100644
--- a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
+++ b/clang/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}}
OpenPOWER on IntegriCloud