diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-06 01:37:56 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-06 01:37:56 +0000 |
commit | aa31b4b81678b6e8f4fd359e49dd92257831dae7 (patch) | |
tree | bd38f73a9d60c3793731ddb4c7b84f0667994e1d /clang/test/Parser/cxx-class.cpp | |
parent | 30c4282f8891d9e71d8a2237fa24011f6eece225 (diff) | |
download | bcm5719-llvm-aa31b4b81678b6e8f4fd359e49dd92257831dae7.tar.gz bcm5719-llvm-aa31b4b81678b6e8f4fd359e49dd92257831dae7.zip |
PR13775: When checking for a tag type being shadowed by some other declaration,
don't trample over the caller's LookupResult in the case where the check fails.
llvm-svn: 163281
Diffstat (limited to 'clang/test/Parser/cxx-class.cpp')
-rw-r--r-- | clang/test/Parser/cxx-class.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp index feccba85cf0..8ed5882a282 100644 --- a/clang/test/Parser/cxx-class.cpp +++ b/clang/test/Parser/cxx-class.cpp @@ -88,6 +88,20 @@ namespace ctor_error { // expected-error{{unknown type name 'UnknownType'}} } +// PR13775: Don't assert here. +namespace PR13775 { + class bar + { + public: + void foo (); + void baz (); + }; + void bar::foo () + { + baz x(); // expected-error 3{{}} + } +} + // PR11109 must appear at the end of the source file class pr11109r3 { // expected-note{{to match this '{'}} public // expected-error{{expected ':'}} expected-error{{expected '}'}} expected-error{{expected ';' after class}} |