Use the existing convenience function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192347
91177308-0d34-0410-b5e6-
96231b3b80d8
const Type* BaseType = Base->getType().getTypePtrOrNull();
if (BaseType && Tok.is(tok::l_paren) &&
(BaseType->isFunctionType() ||
- BaseType->getAsPlaceholderType()->getKind() ==
- BuiltinType::BoundMember)) {
+ BaseType->isSpecificPlaceholderType(BuiltinType::BoundMember))) {
Diag(OpLoc, diag::err_function_is_not_record)
<< (OpKind == tok::arrow) << Base->getSourceRange()
<< FixItHint::CreateRemoval(OpLoc);
// Comment!
}
+void test8() {
+ struct {} o;
+ // This used to crash.
+ (&o)->(); // expected-error{{expected unqualified-id}}
+}
+
namespace PR5066 {
template<typename T> struct X {};
X<int N> x; // expected-error {{type-id cannot have a name}}