From 19beb9c84fe070d0f8f79522b9e7d88d71ad0b1e Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Fri, 18 Dec 2009 16:57:15 +0100 Subject: [PATCH] Fixed parsing of selector argument expressions. --- src/shared/cplusplus/Parser.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index dc5aaac37f4..44467c85847 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -3370,11 +3370,12 @@ bool Parser::parseObjCSelectorArg(ObjCSelectorArgumentAST *&selNode, ObjCMessage selNode->colon_token = consumeToken(); argNode = new (_pool) ObjCMessageArgumentAST; - ExpressionAST *expr = argNode->parameter_value_expression; + ExpressionAST **expr = &(argNode->parameter_value_expression); unsigned expressionStart = cursor(); - if (parseAssignmentExpression(expr) && LA() == T_COLON && expr->asCastExpression()) { + if (parseAssignmentExpression(*expr) && LA() == T_COLON && (*expr)->asCastExpression()) { rewind(expressionStart); - parseUnaryExpression(expr); + parseUnaryExpression(*expr); + // } return true; } -- GitLab