[cfe-commits] r68397 - in /cfe/trunk: lib/Analysis/CFRefCount.cpp test/Analysis/NSPanel.m
Ted Kremenek
kremenek at apple.com
Fri Apr 3 12:02:51 PDT 2009
Author: kremenek
Date: Fri Apr 3 14:02:51 2009
New Revision: 68397
URL: http://llvm.org/viewvc/llvm-project?rev=68397&view=rev
Log:
retain/release checker: don't track NSPanel until we have better reasoning about
the subtle ownership issues of such objects.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
cfe/trunk/test/Analysis/NSPanel.m
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=68397&r1=68396&r2=68397&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Fri Apr 3 14:02:51 2009
@@ -1184,8 +1184,10 @@
// Thus, we need to track an NSWindow's display status.
// This is tracked in <rdar://problem/6062711>.
// See also http://llvm.org/bugs/show_bug.cgi?id=3714.
- addClassMethSummary("NSWindow", "alloc",
- getPersistentSummary(RetEffect::MakeNoRet()));
+ RetainSummary *NoTrackYet = getPersistentSummary(RetEffect::MakeNoRet());
+
+ addClassMethSummary("NSWindow", "alloc", NoTrackYet);
+
#if 0
RetainSummary *NSWindowSumm =
@@ -1200,6 +1202,10 @@
// For NSPanel (which subclasses NSWindow), allocated objects are not
// self-owned.
+ // FIXME: For now we don't track NSPanels. object for the same reason
+ // as for NSWindow objects.
+ addClassMethSummary("NSPanel", "alloc", NoTrackYet);
+
addInstMethSummary("NSPanel", InitSumm, "initWithContentRect",
"styleMask", "backing", "defer", NULL);
Modified: cfe/trunk/test/Analysis/NSPanel.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/NSPanel.m?rev=68397&r1=68396&r2=68397&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/NSPanel.m (original)
+++ cfe/trunk/test/Analysis/NSPanel.m Fri Apr 3 14:02:51 2009
@@ -82,7 +82,7 @@
}
- (void)myMethod2
{
- NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:(BOOL)1]; // expected-warning{{leak}}
+ NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:(BOOL)1]; // no-warning
[panels addObject:panel];
}
More information about the cfe-commits
mailing list