On Tue, Mar 20, 2018 at 10:29 PM, Alexandre Oliva <aol...@redhat.com> wrote:
> On Mar 20, 2018, Jason Merrill <ja...@redhat.com> wrote:
>
>>> +  if (id == error_mark_node)
>>> +    return error_mark_node;
>
>> Why wait until here to return?  There are error returns immediately
>> above and below your first hunk.
>
> QOI.  Returning immediately, we then get other errors.  We could consume
> tokens till the end of the declaration, but I figured we might as well
> try to parse them and see whether there were any other legitimate errors
> to report.

It just seems a bit odd to have the check and the return so far apart.
Do they need to be separate at all?
I think we definitely want to move the check down below the
cp_parser_commit_to_tentative_parse.

Jason

Reply via email to