[cfe-commits] r48406 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/DeclObjC.cpp lib/Sema/SemaDeclObjC.cpp

Chris Lattner sabre at nondot.org
Sat Mar 15 17:58:16 PDT 2008


Author: lattner
Date: Sat Mar 15 19:58:16 2008
New Revision: 48406

URL: http://llvm.org/viewvc/llvm-project?rev=48406&view=rev
Log:
remove some dead arguments to ObjCMethodDecl.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h
    cfe/trunk/lib/AST/DeclObjC.cpp
    cfe/trunk/lib/Sema/SemaDeclObjC.cpp

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=48406&r1=48405&r2=48406&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Sat Mar 15 19:58:16 2008
@@ -77,7 +77,7 @@
   /// ParamInfo - new[]'d array of pointers to VarDecls for the formal
   /// parameters of this Method.  This is null if there are no formals.  
   ParmVarDecl **ParamInfo;
-  int NumMethodParams;  // -1 if no parameters
+  int NumMethodParams;
   
   /// List of attributes for this method declaration.
   AttributeList *MethodAttrs;
@@ -92,7 +92,6 @@
   ObjCMethodDecl(SourceLocation beginLoc, SourceLocation endLoc,
                  Selector SelInfo, QualType T,
                  Decl *contextDecl,
-                 ParmVarDecl **paramInfo = 0, int numParams=-1,
                  AttributeList *M = 0, bool isInstance = true,
                  bool isVariadic = false,
                  ImplementationControl impControl = None,
@@ -102,20 +101,17 @@
     DeclImplementation(impControl), objcDeclQualifier(OBJC_TQ_None),
     MethodContext(static_cast<NamedDecl*>(contextDecl)),
     SelName(SelInfo), MethodDeclType(T), 
-    ParamInfo(paramInfo), NumMethodParams(numParams),
+    ParamInfo(0), NumMethodParams(0),
     MethodAttrs(M), EndLoc(endLoc), Body(0), SelfDecl(0) {}
+  virtual ~ObjCMethodDecl();
 public:
 
   static ObjCMethodDecl *Create(ASTContext &C, SourceLocation beginLoc, 
                                 SourceLocation endLoc, Selector SelInfo,
                                 QualType T, Decl *contextDecl,
-                                ParmVarDecl **paramInfo = 0, int numParams=-1,
                                 AttributeList *M = 0, bool isInstance = true,
                                 bool isVariadic = false,
-                                ImplementationControl impControl = None,
-                                Decl *PrevDecl = 0);
-  
-  virtual ~ObjCMethodDecl();
+                                ImplementationControl impControl = None);
   
   ObjCDeclQualifier getObjCDeclQualifier() const {
     return ObjCDeclQualifier(objcDeclQualifier);

Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=48406&r1=48405&r2=48406&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Sat Mar 15 19:58:16 2008
@@ -23,15 +23,13 @@
                                        SourceLocation endLoc,
                                        Selector SelInfo, QualType T,
                                        Decl *contextDecl,
-                                       ParmVarDecl **paramInfo, int numParams,
                                        AttributeList *M, bool isInstance,
                                        bool isVariadic,
-                                       ImplementationControl impControl,
-                                       Decl *PrevDecl) {
+                                       ImplementationControl impControl) {
   void *Mem = C.getAllocator().Allocate<ObjCMethodDecl>();
   return new (Mem) ObjCMethodDecl(beginLoc, endLoc, SelInfo, T, contextDecl,
-                                  paramInfo, numParams, M, isInstance, 
-                                  isVariadic, impControl, PrevDecl);
+                                  M, isInstance, 
+                                  isVariadic, impControl);
 
 }
 

Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=48406&r1=48405&r2=48406&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Sat Mar 15 19:58:16 2008
@@ -840,7 +840,7 @@
   
   ObjCMethodDecl* ObjCMethod = 
     ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, Sel, resultDeclType,
-                           ClassDecl, 0, -1, AttrList, 
+                           ClassDecl, AttrList, 
                            MethodType == tok::minus, isVariadic,
                            MethodDeclKind == tok::objc_optional ? 
                            ObjCMethodDecl::Optional : 





More information about the cfe-commits mailing list