[cfe-commits] [Patch] Add checking for '(' after '::' - fixes crash as reported in PR11852

Richard Trieu rtrieu at google.com
Thu Nov 1 18:09:50 PDT 2012


Committed at r167268.

On Fri, Oct 5, 2012 at 3:18 PM, David Blaikie <dblaikie at gmail.com> wrote:

> Minor point: misspelled "ColonColon" as "ColocColon".
> "GetLookAheadToken(0)" is synonymous with "getCurToken" as far as I
> know (& the latter's infinitely more common)
>
> Other than that it all looks reasonable - I assume creating a removal
> for a default SourceLocation (in the case where there is no right
> paren to remove) isn't problematic (& just does nothing/is silent)?
> (judging by your test cases I assume it works fine, but I didn't
> build/run it myself to check)
>
> Otherwise the only issue to me is whether this is the best error
> recovery, but that's probably best left to experimentation.
>
> On Fri, Oct 5, 2012 at 2:18 PM, Richard Trieu <rtrieu at google.com> wrote:
> > Clang was crashing when encountering a '(' after '::'.  This patch will
> > allow Clang to detect this code, remove the parens from the token stream,
> > and emit an error with a fix it.  This will fix PR11852.
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121101/81f5c3c8/attachment.html>


More information about the cfe-commits mailing list