]> granicus.if.org Git - clang/commitdiff
ObjcCategoryDecl Does not subclass from ScopedDecl any more.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 2 Oct 2007 17:36:55 +0000 (17:36 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 2 Oct 2007 17:36:55 +0000 (17:36 +0000)
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

Sema/SemaDecl.cpp
include/clang/AST/DeclObjC.h
include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h

index f92bee64dcb617b2bd7db8ce004894e5692b3686..7b5aba390bc7e0bff7bccec6be3be24cc619d963 100644 (file)
@@ -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.
index c85a2f77a8fa01260ee3e93f37a592475cfd2961..615bf454de8793b59c3b9d3e0503cd3f21b8e5df 100644 (file)
@@ -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),
index a2f2fa72e42cbd27d4cd1119d78345c0f44ebf3e..7b93705d8499e17e1b87feee6d7e61d487f7770a 100644 (file)
@@ -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.");
     }