summaryrefslogtreecommitdiffstats
path: root/clang/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
commit497df9126f0b89d0b1b85c334d4fba244b504882 (patch)
tree3bd82d2da77b386d55d0866d089f870dc73f6548 /clang/lib/Analysis/CFRefCount.cpp
parentb2a143fad689f9d1258d252e861431582afe6d3c (diff)
downloadbcm5719-llvm-497df9126f0b89d0b1b85c334d4fba244b504882.tar.gz
bcm5719-llvm-497df9126f0b89d0b1b85c334d4fba244b504882.zip
retain/release checker: Use the ObjCMethodDecl in the @implementation if no
matching ObjCMethodDecl exists in the @interface. llvm-svn: 70474
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index a12542eaaa4..1dc52c797c8 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud