From a8ff9f455d94d9609766cfd5186b6e21dc2102f1 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 20 Feb 2009 20:48:45 +0000 Subject: [PATCH] more random cleanups, add some fixme's. ObjCCategoryImplDecl really shouldn't be a NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65153 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/DeclObjC.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index cc67431c94..4f51f66bb3 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -360,6 +360,7 @@ class ObjCInterfaceDecl : public ObjCContainerDecl { ObjCList IVars; /// List of categories defined for this class. + /// FIXME: Why is this a linked list?? ObjCCategoryDecl *CategoryList; bool ForwardDecl:1; // declared with @class. @@ -699,7 +700,8 @@ class ObjCCategoryDecl : public ObjCContainerDecl { /// referenced protocols in this category. ObjCList ReferencedProtocols; - /// Next category belonging to this class + /// Next category belonging to this class. + /// FIXME: this should not be a singly-linked list. Move storage elsewhere. ObjCCategoryDecl *NextClassCategory; SourceLocation EndLoc; // marks the '>' or identifier. @@ -727,7 +729,7 @@ public: return ReferencedProtocols; } - typedef ObjCProtocolDecl * const * protocol_iterator; + typedef ObjCList::iterator protocol_iterator; protocol_iterator protocol_begin() const {return ReferencedProtocols.begin();} protocol_iterator protocol_end() const { return ReferencedProtocols.end(); } @@ -757,15 +759,18 @@ public: /// @dynamic p1,d1; /// @end /// +/// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl! +/// FIXME: Introduce a new common base class for ObjCImplementationDecl and +/// ObjCCategoryImplDecl class ObjCCategoryImplDecl : public NamedDecl, public DeclContext { /// Class interface for this category implementation ObjCInterfaceDecl *ClassInterface; /// implemented instance methods - llvm::SmallVector InstanceMethods; + llvm::SmallVector InstanceMethods; /// implemented class methods - llvm::SmallVector ClassMethods; + llvm::SmallVector ClassMethods; /// Property Implementations in this category llvm::SmallVector PropertyImplementations; @@ -865,12 +870,12 @@ class ObjCImplementationDecl : public Decl, public DeclContext { ObjCList IVars; /// implemented instance methods - llvm::SmallVector InstanceMethods; + llvm::SmallVector InstanceMethods; /// implemented class methods - llvm::SmallVector ClassMethods; + llvm::SmallVector ClassMethods; - /// Propertys' being implemented + /// Properties being implemented llvm::SmallVector PropertyImplementations; SourceLocation EndLoc; -- 2.50.1