summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-01-25 15:49:34 +0000
committerAlexander Kornienko <alexfh@google.com>2013-01-25 15:49:34 +0000
commit5548879324813b8fa74d1c67e08a2e00ead7785f (patch)
tree4306b8fc350c624696e264e26a7c76c4a83e9f2b /clang/test/SemaCXX/switch-implicit-fallthrough.cpp
parent7a31af140b3a7beada378700a4795e38dd886188 (diff)
downloadbcm5719-llvm-5548879324813b8fa74d1c67e08a2e00ead7785f.tar.gz
bcm5719-llvm-5548879324813b8fa74d1c67e08a2e00ead7785f.zip
Don't suggest to insert [[clang::fallthrough]] before empty cases. Fix for multiple case labels.
llvm-svn: 173458
Diffstat (limited to 'clang/test/SemaCXX/switch-implicit-fallthrough.cpp')
-rw-r--r--clang/test/SemaCXX/switch-implicit-fallthrough.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
index cfc29c237c2..75dda8a9617 100644
--- a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
+++ b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
@@ -34,6 +34,8 @@ int fallthrough(int n) {
case 6: // expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
n += 300;
case 66: // expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert 'break;' to avoid fall-through}}
+ case 67:
+ case 68:
break;
}
switch (n / 20) {
OpenPOWER on IntegriCloud