[cfe-dev] ObjC AST cleanup...

Doug Gregor doug.gregor at gmail.com
Tue Dec 2 14:03:46 PST 2008


On Tue, Dec 2, 2008 at 11:41 AM, steve naroff <snaroff at apple.com> wrote:
> To folks that work with the ObjC AST's,
>
> I've recently written some annoying code that needs to deal
> (generically) with method definitions (attached to a class or category).
>
> As a result, I'd like to consider adding a new base class
> ObjCImplDecl, that will contain the methods and properties for a class
> or category.
>
> Here is the new class hierarchy I'm considering:
>
> class ObjCImplDecl : NamedDecl // new
> class ObjCClassImplDecl : ObjCImplDecl  // previously
> 'ObjCImplementationDecl : NamedDecl'
> class ObjCCategoryImplDecl : ObjCImplDecl // previously
> 'ObjCCategoryImplDecl : NamedDecl'
>
> This will result in (a) less code, simplified classes. (b) allow us to
> operate on method definitions more generically. (c) Improved naming
> (ObjCImplementationDecl->ObjCClassImplDecl).

This seems entirely reasonable to me.

  - Doug



More information about the cfe-dev mailing list