Commit 942f7f5a by Ian Lance Taylor

re PR go/64198 (ICE in gofrontend)

	PR go/64198
compiler: Don't crash on invalid ++.

From-SVN: r218485
parent 58a3bd25
......@@ -3190,9 +3190,12 @@ Parse::call(Expression* func)
if (token->is_op(OPERATOR_COMMA))
token = this->advance_token();
if (!token->is_op(OPERATOR_RPAREN))
error_at(this->location(), "missing %<)%>");
else
this->advance_token();
{
error_at(this->location(), "missing %<)%>");
if (!this->skip_past_error(OPERATOR_RPAREN))
return Expression::make_error(this->location());
}
this->advance_token();
if (func->is_error_expression())
return func;
return Expression::make_call(func, args, is_varargs, func->location());
......
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