aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-09-06 01:37:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-09-06 01:37:56 +0000
commit69e4826edc1858d9e2cdef508b469af750ec2b09 (patch)
treec7804dc1ba1a6b2a5d071bfb6e7ec644933b10e0 /test/Parser/cxx-class.cpp
parent9b925ac059089dfe74e3b8fa5effe519fb9ee885 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-class.cpp')
-rw-r--r--test/Parser/cxx-class.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp
index feccba85cf..8ed5882a28 100644
--- a/test/Parser/cxx-class.cpp
+++ b/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}}