diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-04 23:30:42 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-04 23:30:42 +0000 |
commit | 00dfe3040939aea32f1edbfd5e33a1ca6777708d (patch) | |
tree | d5f21012c5b3b01937c33ed9d7ca47809e728988 /clang/lib/Analysis/CFRefCount.cpp | |
parent | 458b6982d471992337639382cdac1bb30311b4c0 (diff) | |
download | bcm5719-llvm-00dfe3040939aea32f1edbfd5e33a1ca6777708d.tar.gz bcm5719-llvm-00dfe3040939aea32f1edbfd5e33a1ca6777708d.zip |
For now, do not track NSWindow objects and it's subclasses.
llvm-svn: 66107
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 7e6507cbe53..08f4b64f76f 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -645,6 +645,13 @@ private: void addNSObjectMethSummary(Selector S, RetainSummary *Summ) { ObjCMethodSummaries[S] = Summ; } + + void addClassMethSummary(const char* Cls, const char* nullaryName, + RetainSummary *Summ) { + IdentifierInfo* ClsII = &Ctx.Idents.get(Cls); + Selector S = GetNullarySelector(nullaryName, Ctx); + ObjCClassMethodSummaries[ObjCSummaryKey(ClsII, S)] = Summ; + } void addInstMethSummary(const char* Cls, const char* nullaryName, RetainSummary *Summ) { @@ -1150,6 +1157,11 @@ void RetainSummaryManager::InitializeMethodSummaries() { // 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>. + // See also http://llvm.org/bugs/show_bug.cgi?id=3714. + addClassMethSummary("NSWindow", "alloc", + getPersistentSummary(RetEffect::MakeNoRet())); + +#if 0 RetainSummary *NSWindowSumm = getPersistentSummary(RetEffect::MakeReceiverAlias(), StopTracking); @@ -1158,6 +1170,7 @@ void RetainSummaryManager::InitializeMethodSummaries() { addInstMethSummary("NSWindow", NSWindowSumm, "initWithContentRect", "styleMask", "backing", "defer", "screen", NULL); +#endif // For NSPanel (which subclasses NSWindow), allocated objects are not // self-owned. |