aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Decl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r--include/clang/AST/Decl.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index d65ba6e4f4..aba9e17ded 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -583,19 +583,21 @@ public:
class ObjcMethodDecl : public Decl {
public:
ObjcMethodDecl(SourceLocation L, IdentifierInfo *Id, QualType T,
+ ParmVarDecl **paramInfo = 0, int numParams=-1,
AttributeList *M = 0, bool isInstance = true,
Decl *PrevDecl = 0)
- : Decl(ObjcMethod, L, Id, PrevDecl), MethodDeclType(T), ParamInfo(0),
+ : Decl(ObjcMethod, L, Id, PrevDecl), MethodDeclType(T),
+ ParamInfo(paramInfo), NumMethodParams(numParams),
MethodAttrs(M), IsInstance(isInstance) {}
virtual ~ObjcMethodDecl();
QualType getMethodType() const { return MethodDeclType; }
- unsigned getNumMethodParams() const;
+ unsigned getNumMethodParams() const { return NumMethodParams; }
ParmVarDecl *getMethodParamDecl(unsigned i) {
assert(i < getNumMethodParams() && "Illegal param #");
return ParamInfo[i];
}
- void setParams(ParmVarDecl **NewParamInfo, unsigned NumParams);
+ void setMethodParams(ParmVarDecl **NewParamInfo, unsigned NumParams);
AttributeList *getMethodAttrs() const {return MethodAttrs;}
bool isInstance() const { return IsInstance; }
@@ -610,6 +612,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
/// List of attributes for this method declaration.
AttributeList *MethodAttrs;