diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-10 12:24:40 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-10-10 12:24:40 +0000 |
commit | 5fc787fc2ec68d11d551464ef9a1353157785fb3 (patch) | |
tree | 347b65b2c51a3d79dbc018b6bbda3c61a06b3761 /clang/lib/Parse/ParseExpr.cpp | |
parent | 915d169c6a7315b5484eb04839e6c62e52721e3e (diff) | |
download | bcm5719-llvm-5fc787fc2ec68d11d551464ef9a1353157785fb3.tar.gz bcm5719-llvm-5fc787fc2ec68d11d551464ef9a1353157785fb3.zip |
Parser: Avoid a crash-on-invalid when trying to diagnose function calls with -> in it.
Use the existing convenience function.
llvm-svn: 192347
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index c9a718b5278..a82d5cea635 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -1468,8 +1468,7 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) { 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); |