[cfe-commits] r50802 - /cfe/trunk/lib/Analysis/CFRefCount.cpp

Ted Kremenek kremenek at apple.com
Tue May 6 22:34:45 PDT 2008


Author: kremenek
Date: Wed May  7 00:34:45 2008
New Revision: 50802

URL: http://llvm.org/viewvc/llvm-project?rev=50802&view=rev
Log:
Do not treat **instance** methods "copyWithZone:" and "mutableCopyWithZone:" from NSObject as allocators.

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=50802&r1=50801&r2=50802&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Wed May  7 00:34:45 2008
@@ -691,24 +691,7 @@
   ObjCInstMethSummaries[ GetNullarySelector("new", Ctx) ] = Summ;
   
   // Create the "allocWithZone:" selector.
-  ObjCInstMethSummaries[ GetUnarySelector("allocWithZone", Ctx) ] = Summ;
-  
-  // Create the "copyWithZone:" selector.
-  ObjCInstMethSummaries[ GetUnarySelector("copyWithZone", Ctx) ] = Summ;
-    
-  // Create the "mutableCopyWithZone:" selector.
-  ObjCInstMethSummaries[ GetUnarySelector("mutableCopyWithZone", Ctx) ] = Summ;
-  
-  // ** Special cases! **
-  //
-  //  FIXME: It would be great if this one day was in a file, rather than
-  //   hardcoded into the source code.
-  //
-  
-  // NSProcessInfo::processInfo - This instance method does not return
-  //  an owning reference.
-  ObjCInstMethSummaries[ GetNullarySelector("processInfo", Ctx) ] = 
-    getPersistentSummary(RetEffect::MakeNoRet());  
+  ObjCInstMethSummaries[ GetUnarySelector("allocWithZone", Ctx) ] = Summ;    
 }
 
 void RetainSummaryManager::InitializeMethSummaries() {





More information about the cfe-commits mailing list