[cfe-dev] Patch AST ObjC

Chris Lattner clattner at apple.com
Sat Feb 28 10:43:40 PST 2009


On Feb 28, 2009, at 9:56 AM, Jean-Daniel Dupas wrote:

> A proposition to address two FIXME on ObjCCategoryImplDecl:
>
> /// FIXME: Like ObjCImplementationDecl, this should not be a  
> NamedDecl!
> /// FIXME: Introduce a new common base class for  
> ObjCImplementationDecl and ObjCCategoryImplDecl
>
> It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it  
> can inherits from Decl and not NamedDecl (I'm not sure about the  
> memory management of this ivar).
>
> And now that both ObjCImplementationDecl and ObjCCategoryImplDecl  
> have the same super classes, it allow creation of a common base  
> class:  ObjCImplDecl

Great patch! I applied it here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090223/013241.html

> This patch will simplify correction of an other issue:
> When clang check if an objc class implements all declared methods  
> (and properties) in its interface, it does not check methods  
> declared in the Class Extensions (unnamed class categories):
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_6_section_5.html

Great!

This should also help factor a bunch of code in Sema that has to work  
on both types of implementations: now instead of duplicating the code,  
they can work on ObjCImplDecl.

Thanks for working on this!

-Chris



More information about the cfe-dev mailing list