aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-03 05:39:12 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-03 05:39:12 +0000
commit002174f7d60761931f4ec958ca384212a42bb655 (patch)
tree432f02b1793246f61cd51df3e19d629fd59e2d00 /lib/Analysis/CFRefCount.cpp
parent882a51e497c7cf3c21530c51c5b6f44ff2560226 (diff)
retain/release checker: CGBitmapContextCreateWithData() returns an owned object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 120d422d37..853b5823b7 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1031,6 +1031,8 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
// Eventually this can be improved by recognizing that the pixel
// buffer passed to CVPixelBufferCreateWithBytes is released via
// a callback and doing full IPA to make sure this is done correctly.
+ // FIXME: This function has an out parameter that returns an
+ // allocated object.
ScratchArgs = AF.Add(ScratchArgs, 7, StopTracking);
S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing,
DoNothing);
@@ -1044,7 +1046,8 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
// passed to CGBitmapContextCreateWithData is released via
// a callback and doing full IPA to make sure this is done correctly.
ScratchArgs = AF.Add(ScratchArgs, 8, StopTracking);
- S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing,DoNothing);
+ S = getPersistentSummary(RetEffect::MakeOwned(RetEffect::CF, true),
+ DoNothing,DoNothing);
}
break;