summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-class.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-29 01:46:00 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-29 01:46:00 +0000
commit0191023b5ab5127abfa657ee996ec2daaed2d26e (patch)
treebfd7bc72e282531a5c4f99eaf42fe3992dd98598 /clang/test/Parser/cxx-class.cpp
parent39d0ab32438910a0e11a64687146e2023835a93c (diff)
downloadbcm5719-llvm-0191023b5ab5127abfa657ee996ec2daaed2d26e.tar.gz
bcm5719-llvm-0191023b5ab5127abfa657ee996ec2daaed2d26e.zip
Don't try to parse a malformed parameter list after a constructor or operator
name as a direct initializer. llvm-svn: 153628
Diffstat (limited to 'clang/test/Parser/cxx-class.cpp')
-rw-r--r--clang/test/Parser/cxx-class.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp
index 8b8caa585f7..1b3dd41ee82 100644
--- a/clang/test/Parser/cxx-class.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud