aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Decl.h
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-09-12 18:23:47 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-09-12 18:23:47 +0000
commite55cd00d23f0951c29b3b93e6034b2c4b3933a23 (patch)
tree8bcddb99e5c2558689d04ea613e904ab2139e39f /include/clang/AST/Decl.h
parent34947250cea7fa89cfd882a4c5cb51412faa0fee (diff)
Patch for building method declaration nodes. Also fixed a segfault in cocoa.m due
to use of @property. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41880 91177308-0d34-0410-b5e6-96231b3b80d8
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;