From 497df9126f0b89d0b1b85c334d4fba244b504882 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 30 Apr 2009 05:47:23 +0000 Subject: retain/release checker: Use the ObjCMethodDecl in the @implementation if no matching ObjCMethodDecl exists in the @interface. llvm-svn: 70474 --- clang/lib/Analysis/CFRefCount.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib') 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); -- cgit v1.2.3