summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/scope-check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/scope-check.cpp')
-rw-r--r--test/SemaCXX/scope-check.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/scope-check.cpp b/test/SemaCXX/scope-check.cpp
index 8fd23f4..de276ae 100644
--- a/test/SemaCXX/scope-check.cpp
+++ b/test/SemaCXX/scope-check.cpp
@@ -274,3 +274,15 @@ namespace test15 {
goto x; // expected-error {{goto into protected scope}}
}
}
+
+namespace test16 {
+Invalid inv; // expected-error {{unknown type name}}
+// Make sure this doesn't assert.
+void fn()
+{
+ int c = 0;
+ if (inv)
+Here: ;
+ goto Here;
+}
+}
OpenPOWER on IntegriCloud