From: Ted Kremenek Date: Thu, 30 Apr 2009 05:47:23 +0000 (+0000) Subject: retain/release checker: Use the ObjCMethodDecl in the @implementation if no X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76a50e32581cde9f9b288a8086acaf0ac0019dcd;p=clang retain/release checker: Use the ObjCMethodDecl in the @implementation if no matching ObjCMethodDecl exists in the @interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70474 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index a12542eaaa..1dc52c797c 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -770,8 +770,10 @@ public: IdentifierInfo *ClsName = ID->getIdentifier(); QualType ResultTy = MD->getResultType(); - // Resolve the method decl last. - MD = ResolveToInterfaceMethodDecl(MD, Ctx); + // Resolve the method decl last. + if (const ObjCMethodDecl *InterfaceMD = + ResolveToInterfaceMethodDecl(MD, Ctx)) + MD = InterfaceMD; if (MD->isInstanceMethod()) return getInstanceMethodSummary(S, ClsName, ID, MD, ResultTy);