diff options
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 5 | ||||
-rw-r--r-- | test/Analysis/retain-release.m | 2 |
2 files changed, 5 insertions, 2 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; diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m index 19ea5ed1c9..879e8a0413 100644 --- a/test/Analysis/retain-release.m +++ b/test/Analysis/retain-release.m @@ -1119,7 +1119,7 @@ void rdar_7358899(void *data, // this is freed later by the callback. NSNumber *number = [[NSNumber alloc] initWithInt:5]; // no-warning - CGBitmapContextCreateWithData(data, width, height, bitsPerComponent, + CGBitmapContextCreateWithData(data, width, height, bitsPerComponent, // expected-warning{{leak}} bytesPerRow, space, bitmapInfo, releaseCallback, number); } |