/// TODO: Handle protocol list; such as id<p1,p2> in type comparisons
bool Sema:: MatchTwoMethodDeclarations(const ObjcMethodDecl *Method,
const ObjcMethodDecl *PrevMethod) {
- if (Method->getMethodType().getCanonicalType() !=
- PrevMethod->getMethodType().getCanonicalType())
+ if (Method->getResultType().getCanonicalType() !=
+ PrevMethod->getResultType().getCanonicalType())
return false;
for (int i = 0; i < Method->getNumParams(); i++) {
ParmVarDecl *ParamDecl = Method->getParamDecl(i);
SourceRange(lbrac, rbrac));
returnType = GetObjcIdType();
} else {
- returnType = Method->getMethodType();
+ returnType = Method->getResultType();
}
// Expr *RExpr = global reference to the class symbol...
Expr **ArgExprs = reinterpret_cast<Expr **>(Args);
SourceRange(lbrac, rbrac));
returnType = GetObjcIdType();
} else {
- returnType = Method->getMethodType();
+ returnType = Method->getResultType();
}
} else {
// FIXME (snaroff): checking in this code from Patrick. Needs to be
SourceRange(lbrac, rbrac));
returnType = GetObjcIdType();
} else {
- returnType = Method->getMethodType();
+ returnType = Method->getResultType();
}
}
Expr **ArgExprs = reinterpret_cast<Expr **>(Args);
ParamInfo(paramInfo), NumMethodParams(numParams),
MethodAttrs(M) {}
virtual ~ObjcMethodDecl();
- Selector getSelector() const { return SelName; }
- QualType getMethodType() const { return MethodDeclType; }
- unsigned getNumMethodParams() const { return NumMethodParams; }
- ParmVarDecl *getMethodParamDecl(unsigned i) {
- assert(i < getNumMethodParams() && "Illegal param #");
- return ParamInfo[i];
- }
+ Selector getSelector() const { return SelName; }
+ QualType getResultType() const { return MethodDeclType; }
+
int getNumParams() const { return NumMethodParams; }
ParmVarDecl *getParamDecl(int i) const {
assert(i < getNumParams() && "Illegal param #");