diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-05-14 23:22:32 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-05-14 23:22:32 +0000 |
commit | 230826cc424577759568edd39089181389a44919 (patch) | |
tree | c8892444784ac042b68a3b599f67180fbf50282d /clang/test/SemaCXX/nested-name-spec.cpp | |
parent | 609a433159e835c20d863cc562df496e88cb1167 (diff) | |
download | bcm5719-llvm-230826cc424577759568edd39089181389a44919.tar.gz bcm5719-llvm-230826cc424577759568edd39089181389a44919.zip |
Don't mark a type specifier as "owned" if there is no declaration to own.
This simplifies error recovery elsewhere, eliminating the crash in
<rdar://problem/13853540>.
llvm-svn: 181846
Diffstat (limited to 'clang/test/SemaCXX/nested-name-spec.cpp')
-rw-r--r-- | clang/test/SemaCXX/nested-name-spec.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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'?}} } + +// <rdar://problem/13853540> +namespace N { + struct X { }; + namespace N { + struct Foo { + struct N::X *foo(); // expected-error{{no struct named 'X' in namespace 'N::N'}} + }; + } +} |