[cfe-dev] Patch to allow comment translators implementation
clattner at apple.com
Mon Jan 18 17:07:51 PST 2010
On Jan 18, 2010, at 5:02 PM, Abramo Bagnara wrote:
>>> Looks fine to me. Chris?
>> Looks good to me, committed in r93795. I didn't commit the
>> lib/Lex/PPDirectives.cpp hunk, because it didn't look necessary. Please
>> correct me if I'm wrong.
> This part of the patch is strictly related to the others: the way for
> CommentHandler to push tokens is to call EnterTokenStream and this
> method add a TokenLexer (that was ignored by SkipExcludedConditionalBlock)
> Without this part of the patch the pushed tokens related to comments
> found inside skipped conditional block are not read until return from
> Preprocessor::SkipExcludedConditionalBlock and this is clearly unwanted.
I don't see that. According to C, the contents of #if 0 blocks are *completely* skipped and may not even be syntactically valid. Using openmp as an example, it would be perfectly find to have completely malformed openmp comments in #if 0 blocks.
#if 0 skipping is also performance sensitive.
More information about the cfe-dev