diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-04-13 20:01:20 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-04-13 20:01:20 +0000 |
commit | b31abb05fbbdbefecc15a5b9f3c054d8a2ce1a9f (patch) | |
tree | f7e0846404ea34fd576da8f2b4b2504fe0a741c3 /clang/test/SemaCXX/switch-implicit-fallthrough.cpp | |
parent | f209a153f1d03b5b01338e5cf69a4568e49b2b3a (diff) | |
download | bcm5719-llvm-b31abb05fbbdbefecc15a5b9f3c054d8a2ce1a9f.tar.gz bcm5719-llvm-b31abb05fbbdbefecc15a5b9f3c054d8a2ce1a9f.zip |
Revert r234613 (and follow-ups 234614, 234616, 234618), it caused PR23216.
llvm-svn: 234786
Diffstat (limited to 'clang/test/SemaCXX/switch-implicit-fallthrough.cpp')
-rw-r--r-- | clang/test/SemaCXX/switch-implicit-fallthrough.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp index 0bc43cdbd45..a547dc6d9f8 100644 --- a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp +++ b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp @@ -1,6 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough %s - int fallthrough(int n) { switch (n / 10) { if (n - 1) { @@ -300,3 +299,8 @@ 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}} |