summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@gmail.com>2012-05-26 00:49:15 +0000
committerAlexander Kornienko <alexfh@gmail.com>2012-05-26 00:49:15 +0000
commit246e85ddb09ca0ce80cfa3a24cfeab78e1436c0c (patch)
treef2cdf66df52d32be8d16dff45f7f98a7317f90f8 /clang/test/SemaCXX/switch-implicit-fallthrough.cpp
parentca7835c685ca98909666ae8094737163a6f8734b (diff)
downloadbcm5719-llvm-246e85ddb09ca0ce80cfa3a24cfeab78e1436c0c.tar.gz
bcm5719-llvm-246e85ddb09ca0ce80cfa3a24cfeab78e1436c0c.zip
Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a
switch label immediately followed by a 'break;'. llvm-svn: 157508
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 db5508a1257..02532e801ac 100644
--- a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
+++ b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
@@ -33,6 +33,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}}
+ break;
}
switch (n / 20) {
case 7:
OpenPOWER on IntegriCloud