Only warn about missing/incomplete -dealloc implementations when a class contains a non-SEL, non-IBOutlet ivar that references an ObjC object.

llvm-svn: 54024
This commit is contained in:
Ted Kremenek 2008-07-25 17:04:49 +00:00
parent f08932928c
commit 2483730e3f
1 changed files with 7 additions and 6 deletions

View File

@ -71,12 +71,13 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D,
ObjCIvarDecl* ID = *I;
QualType T = ID->getType();
if ((T->isPointerType() || Ctx.isObjCObjectPointerType(T)) &&
(ID->getAttr<IBOutletAttr>() == 0 && // Skip IBOutlets.
!isSEL(T, SelII))) { // Skip SEL ivars.
containsPointerIvar = true;
break;
}
if (!Ctx.isObjCObjectPointerType(T) ||
ID->getAttr<IBOutletAttr>() || // Skip IBOutlets.
isSEL(T, SelII)) // Skip SEL ivars.
continue;
containsPointerIvar = true;
break;
}
if (!containsPointerIvar)