aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-16 00:58:16 +0000
committerChris Lattner <sabre@nondot.org>2008-03-16 00:58:16 +0000
commitb06fa3b86951b9f179c99c3768331536c32e902d (patch)
treea47ff6e5512cce58774da6cea8fe3a021b8dbc33
parent6c4ae5de0c356777446f823b573821fb95560d91 (diff)
remove some dead arguments to ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/DeclObjC.h12
-rw-r--r--lib/AST/DeclObjC.cpp8
-rw-r--r--lib/Sema/SemaDeclObjC.cpp2
3 files changed, 8 insertions, 14 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index b377bb8e13..5e85f9cccf 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -77,7 +77,7 @@ private:
/// 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 @@ private:
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 @@ private:
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);
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp
index ccdc4999bb..9580e0cbf8 100644
--- a/lib/AST/DeclObjC.cpp
+++ b/lib/AST/DeclObjC.cpp
@@ -23,15 +23,13 @@ ObjCMethodDecl *ObjCMethodDecl::Create(ASTContext &C, SourceLocation beginLoc,
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);
}
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 7fc26986c8..a677662f40 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -840,7 +840,7 @@ Sema::DeclTy *Sema::ActOnMethodDeclaration(
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 :