diff options
author | Alexander Kornienko <alexfh@gmail.com> | 2012-05-26 00:49:15 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@gmail.com> | 2012-05-26 00:49:15 +0000 |
commit | 246e85ddb09ca0ce80cfa3a24cfeab78e1436c0c (patch) | |
tree | f2cdf66df52d32be8d16dff45f7f98a7317f90f8 /clang/test/SemaCXX/switch-implicit-fallthrough.cpp | |
parent | ca7835c685ca98909666ae8094737163a6f8734b (diff) | |
download | bcm5719-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.cpp | 2 |
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: |