]> granicus.if.org Git - clang/commitdiff
retain/release checker: Resolve method decl in @interface after getting the
authorTed Kremenek <kremenek@apple.com>
Thu, 30 Apr 2009 05:41:14 +0000 (05:41 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 30 Apr 2009 05:41:14 +0000 (05:41 +0000)
ObjCInterfaceDecl, not before.

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

lib/Analysis/CFRefCount.cpp

index f5d29fd73e3b5c2fdd53d19c1b3e3debc8e88fde..a12542eaaa4d97eb94f9a327d874a633cd9ae0fc 100644 (file)
@@ -765,13 +765,14 @@ public:
   ///  the summary for the current method being analyzed.
   RetainSummary *getMethodSummary(const ObjCMethodDecl *MD) {
     // FIXME: Eventually this should be unneeded.
-    MD = ResolveToInterfaceMethodDecl(MD, Ctx);    
-    
-    Selector S = MD->getSelector();
     const ObjCInterfaceDecl *ID = MD->getClassInterface();
+    Selector S = MD->getSelector();
     IdentifierInfo *ClsName = ID->getIdentifier();
     QualType ResultTy = MD->getResultType();
     
+    // Resolve the method decl last.
+    MD = ResolveToInterfaceMethodDecl(MD, Ctx);    
+    
     if (MD->isInstanceMethod())
       return getInstanceMethodSummary(S, ClsName, ID, MD, ResultTy);
     else