aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-23 02:51:29 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-23 02:51:29 +0000
commit89e202d6a42eb42f3d6025c4d6e4b885bee84e0a (patch)
treeb583f61f69cd9f1ceb6ee023fe298cbf2eccc39e /lib/Analysis/CFRefCount.cpp
parentf0dff4c00eeda61ecd25c9098a6b69d83828605d (diff)
retain/release checker: For now don't track the retain count of NSWindow objects (opt for false negatives).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 0d5752d55b..3816c560b3 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1130,8 +1130,12 @@ void RetainSummaryManager::InitializeMethodSummaries() {
addNSObjectMethSummary(GetNullarySelector("autorelease", Ctx), Summ);
// For NSWindow, allocated objects are (initially) self-owned.
+ // FIXME: For now we opt for false negatives with NSWindow, as these objects
+ // self-own themselves. However, they only do this once they are displayed.
+ // Thus, we need to track an NSWindow's display status.
+ // This is tracked in <rdar://problem/6062711>.
RetainSummary *NSWindowSumm =
- getPersistentSummary(RetEffect::MakeReceiverAlias(), SelfOwn);
+ getPersistentSummary(RetEffect::MakeReceiverAlias(), StopTracking);
addInstMethSummary("NSWindow", NSWindowSumm, "initWithContentRect",
"styleMask", "backing", "defer", NULL);