[cfe-commits] r56818 - in /cfe/trunk/lib/Lex: LiteralSupport.cpp PPMacroExpansion.cpp

Eli Friedman eli.friedman at gmail.com
Mon Sep 29 20:00:17 PDT 2008


On Mon, Sep 29, 2008 at 4:12 PM, Chris Lattner <sabre at nondot.org> wrote:
> Author: lattner
> Date: Mon Sep 29 18:12:31 2008
> New Revision: 56818
>
> URL: http://llvm.org/viewvc/llvm-project?rev=56818&view=rev
> Log:
> Fix the root cause of PR2750 instead of the side effect.
>
> NumericLiteral parser is not careful about overrun because
> it should never be possible.

I'm not very confident in the whole thing, but if you think it works,
that's fine.

It looks like the tokens in question always include some sort of
terminator; the natural terminator when the token points to the
source, a space for artificial numeric macros (with this patch), and
null for tokens created through token pasting (which looks kind of
suspicious...).  Is there some sort of guarantee about the token
including some sort of separator after the token?

-Eli



More information about the cfe-commits mailing list