From 246e85ddb09ca0ce80cfa3a24cfeab78e1436c0c Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Sat, 26 May 2012 00:49:15 +0000 Subject: Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to a switch label immediately followed by a 'break;'. llvm-svn: 157508 --- clang/test/SemaCXX/switch-implicit-fallthrough.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/test') 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: -- cgit v1.2.3