Use ASTContext::isObjCObjectPointerType() to check if an ivar is a reference to an Objective-C object.

llvm-svn: 53999
This commit is contained in:
Ted Kremenek 2008-07-24 23:59:07 +00:00
parent 77c51b2aa3
commit 5eb536b74c
1 changed files with 3 additions and 3 deletions

View File

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