[cfe-dev] [Patch] Remove AllowLookup argument to DeclContext::addDecl()

Douglas Gregor dgregor at apple.com
Mon Jan 12 15:27:10 PST 2009


Hi Piotr,

On Jan 11, 2009, at 4:34 PM, Piotr Rak wrote:
> Because DeclContext::addDecl() builds lazily lookup structure,
> AllowLookup parameter works only when LookupPtr != 0.
> To fix it we would have to store it somehow in DeclContext.
> However, I noticed that it was no single use with other value that  
> true.
> I think, the best option is to just remove it and assume it is  
> always true.
> In case it would be some cases for it in future, we could just learn
> DeclContext::buildLookup() about them. Attached patch removes this  
> argument.

Great, thanks! AllowLookup was a temporary hack that predated the lazy  
construction of the lookup table. Now, we don't need it.

> It also removes needless now ASTContext argument to  
> DeclContext::addDecl(),
> and DeclContext::insert().

Good, good. I've committed this. Thanks!

   - Doug



More information about the cfe-dev mailing list