Per PR 3187, disable the missing -dealloc check for classes that subclass SenTestCase.

llvm-svn: 64292
This commit is contained in:
Ted Kremenek 2009-02-11 07:10:07 +00:00
parent d0d8c540ca
commit bdc2c0c990
1 changed files with 15 additions and 3 deletions

View File

@ -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;