aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CheckObjCDealloc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-02-11 07:10:07 +0000
committerTed Kremenek <kremenek@apple.com>2009-02-11 07:10:07 +0000
commit8cb6fb3bd80d0b051f37c31d8658666361b5b7bb (patch)
tree86d327836ea0de83d5a65267314a97c8a86f3fa2 /lib/Analysis/CheckObjCDealloc.cpp
parentf29b774a7554e8d48e7a4ba08eb3f86eb5c2b219 (diff)
Per PR 3187, disable the missing -dealloc check for classes that subclass SenTestCase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CheckObjCDealloc.cpp')
-rw-r--r--lib/Analysis/CheckObjCDealloc.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/Analysis/CheckObjCDealloc.cpp b/lib/Analysis/CheckObjCDealloc.cpp
index dda25017c3..a14ae26512 100644
--- a/lib/Analysis/CheckObjCDealloc.cpp
+++ b/lib/Analysis/CheckObjCDealloc.cpp
@@ -121,11 +121,23 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D,
// Determine if the class subclasses NSObject.
IdentifierInfo* NSObjectII = &Ctx.Idents.get("NSObject");
+ IdentifierInfo* SenTestCaseII = &Ctx.Idents.get("SenTestCase");
+
- for ( ; ID ; ID = ID->getSuperClass())
- if (ID->getIdentifier() == NSObjectII)
+ for ( ; ID ; ID = ID->getSuperClass()) {
+ IdentifierInfo *II = ID->getIdentifier();
+
+ if (II == NSObjectII)
break;
-
+
+ // FIXME: For now, ignore classes that subclass SenTestCase, as these don't
+ // need to implement -dealloc. They implement tear down in another way,
+ // which we should try and catch later.
+ // http://llvm.org/bugs/show_bug.cgi?id=3187
+ if (II == SenTestCaseII)
+ return;
+ }
+
if (!ID)
return;