[cfe-commits] r59666 - in /cfe/trunk: include/clang/Lex/Preprocessor.h include/clang/Lex/PreprocessorLexer.h lib/Lex/Lexer.cpp lib/Lex/PPDirectives.cpp lib/Lex/PPLexerChange.cpp lib/Lex/PTHLexer.cpp lib/Lex/PreprocessorLexer.cpp
Ted Kremenek
kremenek at apple.com
Thu Nov 20 00:05:02 PST 2008
On Nov 19, 2008, at 11:33 PM, Chris Lattner wrote:
> On Nov 19, 2008, at 11:24 PM, Chris Lattner wrote:
>>> +
>>> + static bool IsNonPragmaNonMacroLexer(const Lexer* L,
>>> + const PreprocessorLexer*
>>> P) {
>>
>> Please add doxygen comment to this and the others.
>
> Actually, better yet, please invert the meaning of this method,
> naming it "isPragmaLexer()". This is very simple and obvious.
> IsNonPragmaNonMacroLexer is not.
>
> -Chris
One is not the negation of the other. The test really means to say
"are we using a lexer that isn't processing a macro or a pragma." Not
being a pragma lexer doesn't rule out being a macro lexer.
More information about the cfe-commits
mailing list