[PATCH] Mimic MSVC whitespace collapse for incompatible token pasting
Will Wilson
will at indefiant.com
Fri Apr 17 05:56:29 PDT 2015
Thanks Reid, committed as r235186.
I've also marked http://llvm.org/pr23071 as fixed.
On 14 April 2015 at 19:55, Reid Kleckner <rnk at google.com> wrote:
> On Mon, Apr 13, 2015 at 4:17 PM, Will Wilson <will at indefiant.com> wrote:
>
>> Hi Reid,
>>
>> I was going to pick your brain on this in person but it seems you're not
>> over in London for the conference. Anyhow, I've tried a few variations but
>> I've been unable to find a way to better handle this edge case without
>> doing some heavy refactoring.
>>
>> Do you have fundamental objections to the approach taken (and I admit
>> it's not pretty) or is it simply that the comment leaves something to be
>> desired - such as a clearer comment?
>>
>
> No, not really. Looks like we do this kind of thing elsewhere in the lexer:
> // If we found the stringify operator, get the argument stringified.
> The
> // preprocessor already verified that the following token is a macro
> name
> // when the #define was parsed.
> const Token &CurTok = Tokens[i];
> if (i != 0 && !Tokens[i-1].is(tok::hashhash) &&
> CurTok.hasLeadingSpace())
> NextTokGetsSpace = true;
>
> lgtm
>
--
*Indefiant *: http://www.indefiant.com
Home of Recode : Runtime C++ Editing for VS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150417/08164815/attachment.html>
More information about the cfe-commits
mailing list