From 230826cc424577759568edd39089181389a44919 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 14 May 2013 23:22:32 +0000 Subject: Don't mark a type specifier as "owned" if there is no declaration to own. This simplifies error recovery elsewhere, eliminating the crash in . llvm-svn: 181846 --- clang/test/SemaCXX/nested-name-spec.cpp | 10 ++++++++++ 1 file changed, 10 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 7239646d8d7..228bc0ecbdb 100644 --- a/clang/test/SemaCXX/nested-name-spec.cpp +++ b/clang/test/SemaCXX/nested-name-spec.cpp @@ -297,3 +297,13 @@ namespace NS { int foobar = a + longer_b; // expected-error {{use of undeclared identifier 'a'; did you mean 'NS::a'?}} \ // expected-error {{use of undeclared identifier 'longer_b'; did you mean 'NS::longer_b'?}} } + +// +namespace N { + struct X { }; + namespace N { + struct Foo { + struct N::X *foo(); // expected-error{{no struct named 'X' in namespace 'N::N'}} + }; + } +} -- cgit v1.2.3