fix PR4452, a crash on invalid. The error recovery is still terrible in this case
but at least we don't crash :)
llvm-svn: 74264
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index 4c3ecee..c3e4eb1 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -171,3 +171,27 @@
X::X() : a(5) { } // expected-error{{use of undeclared identifier 'X'}} \
// expected-error{{C++ requires a type specifier for all declarations}} \
// expected-error{{only constructors take base initializers}}
+
+
+
+
+namespace somens {
+ struct a { };
+}
+
+template <typename T>
+class foo {
+};
+
+
+// PR4452
+// FIXME: This error recovery sucks.
+foo<somens:a> a2; // expected-error {{unexpected namespace name 'somens': expected expression}} \
+expected-error {{C++ requires a type specifier for all declarations}}
+
+// FIXME: This is bogus, there is no int here!
+somens::a a3 = a2; // expected-error {{cannot initialize 'a3' with an lvalue of type 'int'}}
+
+
+
+