diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/SemaCXX/switch-implicit-fallthrough.cpp | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Notes
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; +} |