[cfe-dev] Fix for preprocessor paste bug
richard at metafoo.co.uk
Wed Jun 13 00:03:38 PDT 2012
On Tue, Jun 12, 2012 at 7:01 AM, Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:
> Attached is a patch fixing a preprocessor paste bug.
> The bug manifests itself by swallowing up the remainder of the file
> following an invalid paste operation. In terms of technical details,
> TokenLexer::PasteTokens was returning tok::eof in this case, effectively
> stopping any further processing. The bug includes a test-case
> the fix. No other regressions are noted.
In -fms-extension -Wno-invalid-token-paste mode, the patch regresses this
test, because we're no longer invoking LookUpIdentifierInfo on the pasted
#define foo a ## b ## = 0
Switching out the 'return true' for a 'break' should resolve that, I think.
Your fix should also apply in the AsmPreprocessor case.
Can you merge your test case into the existing file?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev