]> granicus.if.org Git - clang/commitdiff
retain/release checker: Use the ObjCMethodDecl in the @implementation if no
authorTed Kremenek <kremenek@apple.com>
Thu, 30 Apr 2009 05:47:23 +0000 (05:47 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 30 Apr 2009 05:47:23 +0000 (05:47 +0000)
matching ObjCMethodDecl exists in the @interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70474 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index a12542eaaa4d97eb94f9a327d874a633cd9ae0fc..1dc52c797c864ea6107330d8f9228665f11dfa59 100644 (file)
@@ -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);