Commit ffccb612 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Parsing fix for casts in ObjC message expressions.

parent 0ab8f1ed
......@@ -3076,7 +3076,12 @@ bool Parser::parseObjCSelectorArg(ObjCSelectorArgumentAST *&selNode, ObjCMessage
selNode->colon_token = consumeToken();
argNode = new (_pool) ObjCMessageArgumentAST;
parseAssignmentExpression(argNode->parameter_value_expression);
ExpressionAST *expr = argNode->parameter_value_expression;
unsigned expressionStart = cursor();
if (parseAssignmentExpression(expr) && LA() == T_COLON && expr->asCastExpression()) {
rewind(expressionStart);
parseUnaryExpression(expr);
}
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment