aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-30 05:47:23 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-30 05:47:23 +0000
commit76a50e32581cde9f9b288a8086acaf0ac0019dcd (patch)
tree46f659b6649e4cb90fb26c5b675e0451d3deb175 /lib/Analysis/CFRefCount.cpp
parent70a6576c9c8d21ff2361574f4937a2e73bd57779 (diff)
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
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp6
1 files changed, 4 insertions, 2 deletions
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);