forked from OSchip/llvm-project
Move handling of postfix-expression suffixes out of ParseCXXThis and into ParseCastExpression.
No functionality change, this follows the convention of how postfix-expressions are handled. llvm-svn: 54849
This commit is contained in:
parent
0fb45f60d5
commit
37779ade44
|
@ -540,7 +540,9 @@ Parser::ExprResult Parser::ParseCastExpression(bool isUnaryExpression) {
|
|||
case tok::kw_static_cast:
|
||||
return ParseCXXCasts();
|
||||
case tok::kw_this:
|
||||
return ParseCXXThis();
|
||||
Res = ParseCXXThis();
|
||||
// This can be followed by postfix-expr pieces.
|
||||
return ParsePostfixExpressionSuffix(Res);
|
||||
case tok::at: {
|
||||
SourceLocation AtLoc = ConsumeToken();
|
||||
return ParseObjCAtExpression(AtLoc);
|
||||
|
|
|
@ -112,10 +112,5 @@ Parser::ExprResult Parser::ParseThrowExpression() {
|
|||
Parser::ExprResult Parser::ParseCXXThis() {
|
||||
assert(Tok.is(tok::kw_this) && "Not 'this'!");
|
||||
SourceLocation ThisLoc = ConsumeToken();
|
||||
|
||||
ExprResult Res = Actions.ActOnCXXThis(ThisLoc);
|
||||
if (Res.isInvalid)
|
||||
return Res;
|
||||
|
||||
return ParsePostfixExpressionSuffix(Res);
|
||||
return Actions.ActOnCXXThis(ThisLoc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue