[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:02:03 PST 2008


On Nov 19, 2008, at 11:24 PM, Chris Lattner wrote:

>>
>>
>> +    if (L)
>> +      return !L->isPragmaLexer();
>> +    else
>> +      return P != 0;
>
> How about:
>  return P != 0 || !L->isPragmaLexer(); ?

That's logically not the same thing.  If 'L' is non-null then 'P' is  
non-null ('P' will be an alias for 'L'), so testing for 'P != 0' first  
would return true in all cases where 'L' is non-null, not just the  
cases where !L->isPragmaLexer().



More information about the cfe-commits mailing list