[cfe-dev] Clang macro expansion differs from GCC
clattner at apple.com
Tue Apr 13 22:58:39 CDT 2010
Applied here, thanks!
If there is a PR tracking this, please close it.
On Apr 12, 2010, at 9:44 PM, David Peixotto wrote:
> Hi Chris,
> Here is an updated patch that applied cleanly to the trunk. I can see that it is quite a moving target so hopefully it is still valid by the time you get it :) I also fixed the formatting of the & token to be consistent with the rest of the code. Please let me know if you see any more issues. Thanks!
> On Apr 12, 2010, at 7:12 PM, Chris Lattner wrote:
>> On Apr 11, 2010, at 11:43 AM, David Peixotto wrote:
>>> Hi Chris,
>>> I took a look at modifying the preprocessor output and it was pretty
>>> straightforward. I have attached a patch that makes the preprocessed output
>>> less conservative in adding spaces between periods. It will now add a space to
>>> avoid turning ".. ." into "...", but does not always add a space between two
>>> consecutive dots.
>>> The change was done by keeping track of the last two tokens that were output
>>> and testing against those two tokens to avoid creating "...". Previously only
>>> the last output token was tracked and tested against, which caused any two
>>> consecutive . tokens to have a space between them.
>>> The patch passes all the tests in the tests subdirectory. I modified one test
>>> to reflect the output changing from ". . ." to ".. .". This output happens to
>>> match the expected output in the test comment. I also added a test for the
>>> original case that was causing me problems.
>>> Please let me know if there are more tests I should run or anything else that
>>> needs to happen for the patch to be accepted. Thanks!
>> This patch looks great, except that it happens to conflict on mainline. :( Please send and updated patch and I'll be happy to apply it for you. One minor thing is to watch & placement in "const Token& PrevPrevTok, "
>> Thanks for working on this!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev