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.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
index 6ccac122cff..a67f6bef1f4 100644
--- a/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
+++ b/clang/test/SemaCXX/switch-implicit-fallthrough.cpp
@@ -329,3 +329,15 @@ int fallthrough_alt_spelling(int n) {
}
return n;
}
+
+int fallthrough_attribute_spelling(int n) {
+ switch (n) {
+ case 0:
+ n++;
+ __attribute__((fallthrough));
+ case 1:
+ n++;
+ break;
+ }
+ return n;
+}
OpenPOWER on IntegriCloud