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

>
>
>>
>> +    if (L)
>> +      return !L->isPragmaLexer();
>> +    else
>> +      return P != 0;
>
> How about:
>  return P != 0 || !L->isPragmaLexer(); ?
>
>> +public:
>> +  unsigned getFileID() const {
>> +    assert(PP &&
>> +      "PreprocessorLexer::getFileID() should only be used with a  
>> Preprocessor");
>> +    return FileID;
>> +  }
>
> Needs a doxygen comment.  Why the assert?
>
> -Chris
>

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to