Author: kremenek
Date: Thu Apr 30 00:41:14 2009
New Revision: 70473

URL: http://llvm.org/viewvc/llvm-project?rev=70473&view=rev
Log:
retain/release checker: Resolve method decl in @interface after getting the
ObjCInterfaceDecl, not before.

Modified:
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=70473&r1=70472&r2=70473&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Thu Apr 30 00:41:14 2009
@@ -765,13 +765,14 @@
   ///  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


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to