On Nov 19, 2008, at 1:57 PM, Ted Kremenek wrote:
>
> URL: http://llvm.org/viewvc/llvm-project?rev=59666&view=rev
> Log:
> - Move static function IsNonPragmaNonMacroLexer into Preprocessor.h.
> - Add variants of IsNonPragmaNonMacroLexer to accept an  
> IncludeMacroStack entry
>  (simplifies some uses).
> - Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.
> - Add 'FileID' to PreprocessorLexer, and have Preprocessor query  
> this fileid
>  when looking up the FileEntry for a file

Ok.

> +
> +
> +  static bool IsNonPragmaNonMacroLexer(const Lexer* L,
> +                                       const PreprocessorLexer* P) {

Please add doxygen comment to this and the others.

>
> +    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