summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/switch-implicit-fallthrough.cpp')
-rw-r--r--clang/test/SemaCXX/switch-implicit-fallthrough.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
index a547dc6d9f8..0bc43cdbd45 100644
--- a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
+++ b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough %s
+
int fallthrough(int n) {
switch (n / 10) {
if (n - 1) {
@@ -299,8 +300,3 @@ int fallthrough_targets(int n) {
}
return n;
}
-
-[[clang::fallthrough]] int a; // expected-error {{'fallthrough' attribute only applies to empty statements}}
-[[clang::fallthrough]] int f(); // expected-error {{'fallthrough' attribute only applies to empty statements}}
-void g([[clang::fallthrough]] int p); // expected-error {{'fallthrough' attribute only applies to empty statements}}
-struct [[clang::fallthrough]] S; // expected-error {{'fallthrough' attribute only applies to empty statements}}
OpenPOWER on IntegriCloud