From d8a2771109d5325adba3acbf06dbb0987162f7fe Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 24 Jun 2011 19:59:27 +0000 Subject: Only do delayed diagnostics if there were no errors when parsing the decl. Fixes crash in http://llvm.org/PR10109 & rdar://9584039. llvm-svn: 133816 --- clang/test/SemaCXX/nested-name-spec.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'clang/test/SemaCXX/nested-name-spec.cpp') diff --git a/clang/test/SemaCXX/nested-name-spec.cpp b/clang/test/SemaCXX/nested-name-spec.cpp index fef70931717..8ba02fe242e 100644 --- a/clang/test/SemaCXX/nested-name-spec.cpp +++ b/clang/test/SemaCXX/nested-name-spec.cpp @@ -266,3 +266,22 @@ namespace rdar7980179 { namespace alias = A; double *dp = (alias::C*)0; // expected-error{{cannot initialize a variable of type 'double *' with an rvalue of type 'alias::C *'}} + +// http://llvm.org/PR10109 +namespace PR10109 { +template +struct A { +protected: + struct B; + struct B::C; // expected-error {{requires a template parameter list}} \ + // expected-error {{no struct named 'C'}} +}; + +template +struct A2 { +protected: + struct B; +}; +template +struct A2::B::C; // expected-error {{no struct named 'C'}} +} -- cgit v1.2.3