diff options
Diffstat (limited to 'test/SemaCXX/switch-implicit-fallthrough.cpp')
-rw-r--r-- | test/SemaCXX/switch-implicit-fallthrough.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaCXX/switch-implicit-fallthrough.cpp b/test/SemaCXX/switch-implicit-fallthrough.cpp index 9540b1ff28808..6ccac122cff73 100644 --- a/test/SemaCXX/switch-implicit-fallthrough.cpp +++ b/test/SemaCXX/switch-implicit-fallthrough.cpp @@ -314,3 +314,18 @@ int fallthrough_targets(int n) { } return n; } + +int fallthrough_alt_spelling(int n) { + switch (n) { + case 0: + n++; + [[clang::fallthrough]]; + case 1: + n++; + [[clang::__fallthrough__]]; + case 2: + n++; + break; + } + return n; +} |