summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/scope-check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/scope-check.cpp')
-rw-r--r--clang/test/SemaCXX/scope-check.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/scope-check.cpp b/clang/test/SemaCXX/scope-check.cpp
index d656a074db3..ec2f2e565fc 100644
--- a/clang/test/SemaCXX/scope-check.cpp
+++ b/clang/test/SemaCXX/scope-check.cpp
@@ -191,4 +191,19 @@ bool recurse() {
break;
}
}
+
+
+namespace test10 {
+
+int test() {
+ static void *ps[] = { &&a0 };
+ goto *&&a0; // expected-error {{goto into protected scope}}
+ int a = 3; // expected-note {{jump bypasses variable initialization}}
+ a0:
+ return 0;
+}
+
}
+
+}
+
OpenPOWER on IntegriCloud