[cfe-dev] ObjC AST cleanup...

steve naroff snaroff at apple.com
Tue Dec 2 11:41:27 PST 2008


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).

Since changes to the AST's can effect everyone, I wanted to get some  
buy-in before I make this change.

Anyone see any problems with this?

Thanks,

snaroff



More information about the cfe-dev mailing list