RetainSummary* getSummary(FunctionDecl* FD);
RetainSummary* getMethodSummary(ObjCMessageExpr* ME, ObjCInterfaceDecl* ID);
- RetainSummary* getClassMethodSummary(ObjCMessageExpr *ME, Selector S);
+ RetainSummary* getClassMethodSummary(ObjCMessageExpr *ME);
bool isGCEnabled() const { return GCEnabled; }
};
return getInitMethodSummary(ME);
// Look for methods that return an owned object.
- if (!isTrackedObjectType(Ctx.getCanonicalType(ME->getType())))
+ if (!isTrackedObjectType(ME->getType()))
return 0;
// EXPERIMENTAL: Assume the Cocoa conventions for all objects returned
}
RetainSummary*
-RetainSummaryManager::getClassMethodSummary(ObjCMessageExpr* ME,
- Selector S) {
+RetainSummaryManager::getClassMethodSummary(ObjCMessageExpr* ME) {
// FIXME: Eventually we should properly do class method summaries, but
// it requires us being able to walk the type hierarchy. Unfortunately,
// we cannot do this with just an IdentifierInfo* for the class name.
IdentifierInfo* ClsName = ME->getClassName();
+ Selector S = ME->getSelector();
// Look up a summary in our cache of Selectors -> Summaries.
ObjCMethodSummariesTy::iterator I = ObjCClassMethodSummaries.find(ClsName, S);
return I->second;
// Look for methods that return an owned object.
- if (!isTrackedObjectType(Ctx.getCanonicalType(ME->getType())))
+ if (!isTrackedObjectType(ME->getType()))
return 0;
// EXPERIMENTAL: Assume the Cocoa conventions for all objects returned
// by class methods.
// Look for methods that return an owned object.
- if (!isTrackedObjectType(Ctx.getCanonicalType(ME->getType())))
- return 0;
-
+
const char* s = S.getIdentifierInfoForSlot(0)->getName();
RetEffect E = followsFundamentalRule(s)
? (isGCEnabled() ? RetEffect::MakeNotOwned(RetEffect::ObjC)
}
}
else
- Summ = Summaries.getClassMethodSummary(ME, ME->getSelector());
+ Summ = Summaries.getClassMethodSummary(ME);
EvalSummary(Dst, Eng, Builder, ME, ME->getReceiver(), Summ,
ME->arg_begin(), ME->arg_end(), Pred);