From: Fariborz Jahanian Date: Tue, 2 Oct 2007 17:36:55 +0000 (+0000) Subject: ObjcCategoryDecl Does not subclass from ScopedDecl any more. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60199032e41216fa2fca635c7a942e5473cdf979;p=clang ObjcCategoryDecl Does not subclass from ScopedDecl any more. Ted may want to take a look at the change I made at FGRecStmtDeclVisitor.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42535 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index f92bee64dc..7b5aba390b 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -1031,7 +1031,7 @@ Sema::DeclTy *Sema::ObjcStartCatInterface(Scope* S, IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) { ObjcCategoryDecl *CDecl; ObjcInterfaceDecl* IDecl = getObjCInterfaceDecl(S, ClassName, ClassLoc); - CDecl = new ObjcCategoryDecl(AtInterfaceLoc, NumProtoRefs, ClassName); + CDecl = new ObjcCategoryDecl(AtInterfaceLoc, NumProtoRefs); CDecl->setClassInterface(IDecl); /// Check that class of this category is already completely declared. diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index c85a2f77a8..615bf454de 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -401,7 +401,7 @@ public: /// Lisp and Smalltalk. More traditional class-based languages (C++, Java) /// don't support this level of dynamism, which is both powerful and dangerous. /// -class ObjcCategoryDecl : public ScopedDecl { // FIXME: don't subclass from ScopedDecl! +class ObjcCategoryDecl : public Decl { /// Interface belonging to this category ObjcInterfaceDecl *ClassInterface; @@ -424,9 +424,8 @@ class ObjcCategoryDecl : public ScopedDecl { // FIXME: don't subclass from Scope ObjcCategoryDecl *NextClassCategory; public: - ObjcCategoryDecl(SourceLocation L, unsigned numRefProtocol, - IdentifierInfo *Id) - : ScopedDecl(ObjcCategory, L, Id, 0), + ObjcCategoryDecl(SourceLocation L, unsigned numRefProtocol) + : Decl(ObjcCategory), ClassInterface(0), ObjcCatName(0), CatReferencedProtocols(0), NumCatReferencedProtocols(-1), CatInsMethods(0), NumCatInsMethods(-1), diff --git a/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h b/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h index a2f2fa72e4..7b93705d84 100644 --- a/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h +++ b/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h @@ -66,7 +66,6 @@ public: DISPATCH_CASE(ObjcInterface,ObjcInterfaceDecl) DISPATCH_CASE(ObjcClass,ObjcClassDecl) DISPATCH_CASE(ObjcProtocol,ObjcProtocolDecl) - DISPATCH_CASE(ObjcCategory,ObjcCategoryDecl) default: assert(false && "Subtype of ScopedDecl not handled."); }