summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-03 05:34:07 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-03 05:34:07 +0000
commitd1b67db2e8d6dfceebb84da2857bd37ce9128034 (patch)
treeb79239536e4d1e5a2a38bb4f8cb68d35d101c897 /clang/lib/Analysis/CFRefCount.cpp
parent5a3832496adce1fd906d229ef987b2088d8cf5ac (diff)
downloadbcm5719-llvm-d1b67db2e8d6dfceebb84da2857bd37ce9128034.tar.gz
bcm5719-llvm-d1b67db2e8d6dfceebb84da2857bd37ce9128034.zip
retain/release checker: Add special handling of CGBitmapContextCreateWithData().
Fixes: <rdar://problem/7358899> llvm-svn: 85864
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index c629ad1d961..120d422d374 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -1036,6 +1036,17 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
DoNothing);
}
break;
+
+ case 29:
+ if (!memcmp(FName, "CGBitmapContextCreateWithData", 29)) {
+ // FIXES: <rdar://problem/7358899>
+ // Eventually this can be improved by recognizing that 'releaseInfo'
+ // 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);
+ }
+ break;
case 32:
if (!memcmp(FName, "IOServiceAddMatchingNotification", 32)) {
OpenPOWER on IntegriCloud