summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-18 23:14:34 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-18 23:14:34 +0000
commit501ba0365a96b5d11bfb48d481396be4a0bfb6f7 (patch)
tree6500ca631329009767c094b253f0c507305b55c6 /clang/lib/Analysis/CFRefCount.cpp
parentec78f1516da51e2e7dcade608a99b5e59d8f4397 (diff)
downloadbcm5719-llvm-501ba0365a96b5d11bfb48d481396be4a0bfb6f7.tar.gz
bcm5719-llvm-501ba0365a96b5d11bfb48d481396be4a0bfb6f7.zip
Fix PR 4230: Don't flag leaks of NSAutoreleasePools until we know that we aren' at the top-most scope of autorelease pools.
llvm-svn: 72065
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index fbe95825166..d3f6ffbb60d 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -1438,6 +1438,10 @@ void RetainSummaryManager::InitializeMethodSummaries() {
addInstMethSummary("NSPanel", NoTrackYet, "initWithContentRect",
"styleMask", "backing", "defer", "screen", NULL);
#endif
+
+ // Don't track allocated autorelease pools yet, as it is okay to prematurely
+ // exit a method.
+ addClassMethSummary("NSAutoreleasePool", "alloc", NoTrackYet);
// Create NSAssertionHandler summaries.
addPanicSummary("NSAssertionHandler", "handleFailureInFunction", "file",
OpenPOWER on IntegriCloud