From: Fariborz Jahanian Date: Mon, 8 Oct 2007 17:35:11 +0000 (+0000) Subject: Removed unnecessary base class from some of objective-c classes: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d4caf26945095cc21dd7c79d2442668ed3a61b6;p=clang Removed unnecessary base class from some of objective-c classes: ObjcProtocolDecl is now derived from ScopedDecl. ObjcForwardProtocolDecl from Decl. ObjcImplementationDecl fom NamedDecl. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42756 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index 6ca61e7594..8ef2cff313 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -739,6 +739,7 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; + compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* clang */; projectDirPath = ""; diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 88da3a20a9..b53996fb86 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -283,7 +283,7 @@ public: /// /// id anyObjectThatImplementsNSDraggingInfo; /// -class ObjcProtocolDecl : public TypeDecl { +class ObjcProtocolDecl : public ScopedDecl { /// referenced protocols ObjcProtocolDecl **ReferencedProtocols; // Null if none int NumReferencedProtocols; // -1 if none @@ -300,7 +300,7 @@ class ObjcProtocolDecl : public TypeDecl { public: ObjcProtocolDecl(SourceLocation L, unsigned numRefProtos, IdentifierInfo *Id, bool FD = false) - : TypeDecl(ObjcProtocol, L, Id, 0), + : ScopedDecl(ObjcProtocol, L, Id, 0), ReferencedProtocols(0), NumReferencedProtocols(-1), InstanceMethods(0), NumInstanceMethods(-1), ClassMethods(0), NumClassMethods(-1), @@ -376,13 +376,13 @@ public: /// /// @protocol NSTextInput, NSChangeSpelling, NSDraggingInfo; /// -class ObjcForwardProtocolDecl : public TypeDecl { +class ObjcForwardProtocolDecl : public Decl { ObjcProtocolDecl **ReferencedProtocols; unsigned NumReferencedProtocols; public: ObjcForwardProtocolDecl(SourceLocation L, ObjcProtocolDecl **Elts, unsigned nElts) - : TypeDecl(ObjcForwardProtocol, L, 0, 0) { + : Decl(ObjcForwardProtocol, L) { NumReferencedProtocols = nElts; if (nElts) { ReferencedProtocols = new ObjcProtocolDecl*[nElts]; @@ -555,7 +555,7 @@ class ObjcCategoryImplDecl : public NamedDecl { /// the legacy semantics and allow developers to move private ivar declarations /// from the class interface to the class implementation (but I digress:-) /// -class ObjcImplementationDecl : public TypeDecl { +class ObjcImplementationDecl : public NamedDecl { /// Implementation Class's super class. ObjcInterfaceDecl *SuperClass; @@ -575,7 +575,7 @@ class ObjcImplementationDecl : public TypeDecl { public: ObjcImplementationDecl(SourceLocation L, IdentifierInfo *Id, ObjcInterfaceDecl* superDecl) - : TypeDecl(ObjcImplementation, L, Id, 0), + : NamedDecl(ObjcImplementation, L, Id), SuperClass(superDecl), Ivars(0), NumIvars(-1), InstanceMethods(0), NumInstanceMethods(-1),