]> granicus.if.org Git - clang/commitdiff
'[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a DoNothing effect.
authorTed Kremenek <kremenek@apple.com>
Mon, 23 Feb 2009 02:31:16 +0000 (02:31 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 23 Feb 2009 02:31:16 +0000 (02:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65301 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index 29ad73f0f90a5ead67c74631c8e6a8cffaf72c13..e7c116588da9531e482587ad295a791d595acb1a 100644 (file)
@@ -829,7 +829,7 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
       break;
     }
     
-    // [PR 3337] Use 'getDesugaredType' to strip away any typedefs on the
+    // [PR 3337]q Use 'getDesugaredType' to strip away any typedefs on the
     // function's type.
     FunctionType* FT = cast<FunctionType>(FD->getType()->getDesugaredType());
     const char* FName = FD->getIdentifier()->getName();
@@ -1088,7 +1088,7 @@ void RetainSummaryManager::InitializeClassMethodSummaries() {
   addClsMethSummary(&Ctx.Idents.get("NSAutoreleasePool"),
                     GetUnarySelector("addObject", Ctx),
                     getPersistentSummary(RetEffect::MakeNoRet(),
-                                         DoNothing, DoNothing));
+                                         DoNothing, Autorelease));
 }
 
 void RetainSummaryManager::InitializeMethodSummaries() {