From b2a143fad689f9d1258d252e861431582afe6d3c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 30 Apr 2009 05:41:14 +0000 Subject: retain/release checker: Resolve method decl in @interface after getting the ObjCInterfaceDecl, not before. llvm-svn: 70473 --- clang/lib/Analysis/CFRefCount.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/lib/Analysis/CFRefCount.cpp') diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index f5d29fd73e3..a12542eaaa4 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -765,13 +765,14 @@ public: /// the summary for the current method being analyzed. RetainSummary *getMethodSummary(const ObjCMethodDecl *MD) { // FIXME: Eventually this should be unneeded. - MD = ResolveToInterfaceMethodDecl(MD, Ctx); - - Selector S = MD->getSelector(); const ObjCInterfaceDecl *ID = MD->getClassInterface(); + Selector S = MD->getSelector(); IdentifierInfo *ClsName = ID->getIdentifier(); QualType ResultTy = MD->getResultType(); + // Resolve the method decl last. + MD = ResolveToInterfaceMethodDecl(MD, Ctx); + if (MD->isInstanceMethod()) return getInstanceMethodSummary(S, ClsName, ID, MD, ResultTy); else -- cgit v1.2.3