[cfe-commits] r54849 - in /cfe/trunk/lib/Parse: ParseExpr.cpp ParseExprCXX.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Sat Aug 16 12:34:48 PDT 2008
Author: akirtzidis
Date: Sat Aug 16 14:34:46 2008
New Revision: 54849
URL: http://llvm.org/viewvc/llvm-project?rev=54849&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Parse/ParseExpr.cpp
cfe/trunk/lib/Parse/ParseExprCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExpr.cpp?rev=54849&r1=54848&r2=54849&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExpr.cpp Sat Aug 16 14:34:46 2008
@@ -540,7 +540,9 @@
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);
Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=54849&r1=54848&r2=54849&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Sat Aug 16 14:34:46 2008
@@ -112,10 +112,5 @@
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);
}
More information about the cfe-commits
mailing list