On Mon, Sep 17, 2012 at 7:58 AM, Ahmed Bougacha <[email protected]>wrote:

> Hi,
>
> On Tue, Sep 11, 2012 at 7:35 AM, Richard Smith <[email protected]>
> wrote:
> >
> > It looks like you're now consuming the ',' before bailing out. I'm not
> sure
> > whether that's detectable, but you should leave it in the token stream
> > anyway so other parts of the compiler can recover better (for instance,
> we
> > could offer a ',' -> ';' typo correction in this situation by extending
> > IsCommonTypo). Given that you're now looking a couple of tokens past the
> > comma, it'll be best to go back to your former approach of putting it
> back
> > into the token stream if you find that it's a typo.
>
> We reverted back to leaving the comma, which, when handled by
> IsCommonTypo, gives the expected errors.
>

Thanks! I've checked this in as r164085, along with some more test cases. I
also moved the isDeclarationStatement checks to a new Parser method,
isKnownToBeDeclarationSpecifier.

-- Richard
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to