[cfe-commits] [PATCH] PR7606: Diagnostic for ',' instead of '; ' at the end of a statement

Ahmed Bougacha ahmed.bougacha at gmail.com
Mon Sep 17 07:58:02 PDT 2012


Hi,

On Tue, Sep 11, 2012 at 7:35 AM, Richard Smith <richard at metafoo.co.uk> 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.

If you have other advice, we'd be glad to hear it!
Thanks again,

-- 
Amaury de la Vieuville
Ahmed Bougacha
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR7606.patch
Type: application/octet-stream
Size: 3720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120917/4330f6c3/attachment.obj>


More information about the cfe-commits mailing list