diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-29 01:46:00 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-29 01:46:00 +0000 |
commit | 52f10d5f474741d2226630f576d44f1bf946d40a (patch) | |
tree | e4d9d90b911742546bf356237423454d6798d0f2 /test/Parser/cxx-class.cpp | |
parent | 9988f28fe7a6c19239a7426fea1ab23f9a8aac9c (diff) |
Don't try to parse a malformed parameter list after a constructor or operator
name as a direct initializer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153628 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-class.cpp')
-rw-r--r-- | test/Parser/cxx-class.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp index 8b8caa585f..1b3dd41ee8 100644 --- a/test/Parser/cxx-class.cpp +++ b/test/Parser/cxx-class.cpp @@ -72,17 +72,16 @@ namespace ctor_error { Ctor(x[5]); // expected-error{{incomplete type}} Ctor(UnknownType *); // expected-error{{unknown type name 'UnknownType'}} + void operator+(UnknownType*); // expected-error{{unknown type name 'UnknownType'}} }; Ctor::Ctor (x) = { 0 }; // \ // expected-error{{qualified reference to 'Ctor' is a constructor name}} - // FIXME: These diagnostics are terrible. Ctor::Ctor(UnknownType *) {} // \ - // expected-error{{'Ctor' cannot be the name of a variable or data member}} \ - // expected-error{{use of undeclared identifier 'UnknownType'}} \ - // expected-error{{expected expression}} \ - // expected-error{{expected ';' after top level declarator}} + // expected-error{{unknown type name 'UnknownType'}} + void Ctor::operator+(UnknownType*) {} // \ + // expected-error{{unknown type name 'UnknownType'}} } // PR11109 must appear at the end of the source file |