[cfe-dev] Fwd: [cfe-commits] r61797 - /cfe/trunk/include/clang/AST/DeclBase.h
Piotr Rak
piotr.rak at gmail.com
Tue Jan 6 11:20:14 PST 2009
---------- Forwarded message ----------
From: Piotr Rak <piotr.rak at gmail.com>
Date: 2009/1/6
Subject: Re: [cfe-commits] r61797 - /cfe/trunk/include/clang/AST/DeclBase.h
To: Chris Lattner <sabre at nondot.org>
Hi,
2009/1/6 Chris Lattner <sabre at nondot.org>:
> Author: lattner
> Date: Tue Jan 6 01:16:40 2009
> New Revision: 61797
>
> URL: http://llvm.org/viewvc/llvm-project?rev=61797&view=rev
> Log:
> add a helper method.
>
> Modified:
> cfe/trunk/include/clang/AST/DeclBase.h
>
> Modified: cfe/trunk/include/clang/AST/DeclBase.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=61797&r1=61796&r2=61797&view=diff
>
>
> + bool isInIdentifierNamespace(unsigned NS) const {
> + return getIdentifierNamespace() & NS;
> + }
> +
> // getBody - If this Decl represents a declaration for a body of code,
> // such as a function or method definition, this method returns the top-level
> // Stmt* of that body. Otherwise this method returns null.
>
This is fine, however we will have to check more and more conditions
in LookupDecl, and it will get more arguemnts. How about passing
predicate object to LookupDecl + some Sema methods creating predicates
for most common cases?
Piotr
More information about the cfe-dev
mailing list