Fix the crash-on-invalid from PR6259.
llvm-svn: 95554
diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp
index dbbf1fe..8a217b3 100644
--- a/clang/test/SemaCXX/nested-name-spec.cpp
+++ b/clang/test/SemaCXX/nested-name-spec.cpp
@@ -220,3 +220,12 @@
int *ns::count_ptr = &count;
}
+
+// PR6259, invalid case
+namespace test3 {
+ // FIXME: this should really only trigger once
+ class A; // expected-note 2 {{forward declaration}}
+ void foo(const char *path) {
+ A::execute(path); // expected-error 2 {{incomplete type 'class test3::A' named in nested name specifier}}
+ }
+}