'[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a DoNothing effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65301 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 29ad73f..e7c1165 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -829,7 +829,7 @@
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 @@
addClsMethSummary(&Ctx.Idents.get("NSAutoreleasePool"),
GetUnarySelector("addObject", Ctx),
getPersistentSummary(RetEffect::MakeNoRet(),
- DoNothing, DoNothing));
+ DoNothing, Autorelease));
}
void RetainSummaryManager::InitializeMethodSummaries() {