[cfe-dev] Fwd: [cfe-commits] r61797 - /cfe/trunk/include/clang/AST/DeclBase.h
Chris Lattner
clattner at apple.com
Tue Jan 6 13:54:57 PST 2009
On Jan 6, 2009, at 11:20 AM, Piotr Rak wrote:
>>
>> + 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?
Are you asking about this patch or lookup decl in particular? I also
agree that having tons of different flags on lookupdecl is
suboptimal. Instead of having lots of bools, it would be better to
use |'d together enums. It's easier to tell what LookupDecl(...,
LD_NameSpaceOnly|LD_FOOBar) does than LookupDecl(..., true, false,
false, true).
-Chris
More information about the cfe-dev
mailing list