[cfe-dev] Patch for IdentifierResolver

Chris Lattner clattner at apple.com
Tue Apr 15 11:08:00 PDT 2008


On Apr 14, 2008, at 4:46 PM, Steve Naroff wrote:

>> Hi Argiris,
>>
>> I really think we should just remove this, and add it if actually  
>> needed by a client.  While we could probably merge this in somehow  
>> in a low-cost way, it would increase the complexity of the code,  
>> which is itself a loss...
>>
>
> fyi...ScopedDecl::getNextDeclarator() is currently used in 31  
> places. For DeclStmt/EnumDecl, it should be trivial to remove (they  
> can just implement the list explicitly). There are other cases (like  
> ScopedDecl::EmitOutRec()) that might require a little work. It's  
> also a little odd that RecordDecl currently depends on it.

A lot of these can be changed to use the new DeclContext related  
stuff.  Ideally ContextDecl will contain a list of all decls within  
its context, which will be sufficient for enums etc.

> Do you think the effort to remove it is worth the cleanup? Seems  
> like it's being used quite a bit (though some of the uses are  
> probably questionable). I tend to agree with you, however wanted to  
> double check (realizing it isn't a real low cost cleanup...).

Yes, but it probably makes sense to get DeclContext finished first.

-Chris



More information about the cfe-dev mailing list