summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CheckObjCDealloc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-07-25 18:17:35 +0000
committerTed Kremenek <kremenek@apple.com>2008-07-25 18:17:35 +0000
commit83ec24501ef41fecac0b000c49b2c4ca644aea74 (patch)
treea138cf0b8c38dafc09bcf91bb1683f05c6fd4eb2 /clang/lib/Analysis/CheckObjCDealloc.cpp
parentec8996d7718b09ac845256014223bc629f5913b7 (diff)
downloadbcm5719-llvm-83ec24501ef41fecac0b000c49b2c4ca644aea74.tar.gz
bcm5719-llvm-83ec24501ef41fecac0b000c49b2c4ca644aea74.zip
Remove call to isSEL and isSEL itself since the call is dead (isObjCObjectPointerType() will never return true for selectors).
llvm-svn: 54034
Diffstat (limited to 'clang/lib/Analysis/CheckObjCDealloc.cpp')
-rw-r--r--clang/lib/Analysis/CheckObjCDealloc.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/clang/lib/Analysis/CheckObjCDealloc.cpp b/clang/lib/Analysis/CheckObjCDealloc.cpp
index ba0eb6ac6a1..39d1e05b944 100644
--- a/clang/lib/Analysis/CheckObjCDealloc.cpp
+++ b/clang/lib/Analysis/CheckObjCDealloc.cpp
@@ -42,13 +42,6 @@ static bool scan_dealloc(Stmt* S, Selector Dealloc) {
return false;
}
-static bool isSEL(QualType T, IdentifierInfo* SelII) {
- if (const TypedefType* Ty = T->getAsTypedefType())
- return Ty->getDecl()->getIdentifier() == SelII;
-
- return false;
-}
-
void clang::CheckObjCDealloc(ObjCImplementationDecl* D,
const LangOptions& LOpts, BugReporter& BR) {
@@ -63,7 +56,6 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D,
// http://llvm.org/bugs/show_bug.cgi?id=2517
bool containsPointerIvar = false;
- IdentifierInfo* SelII = &Ctx.Idents.get("SEL");
for (ObjCInterfaceDecl::ivar_iterator I=ID->ivar_begin(), E=ID->ivar_end();
I!=E; ++I) {
@@ -72,8 +64,7 @@ void clang::CheckObjCDealloc(ObjCImplementationDecl* D,
QualType T = ID->getType();
if (!Ctx.isObjCObjectPointerType(T) ||
- ID->getAttr<IBOutletAttr>() || // Skip IBOutlets.
- isSEL(T, SelII)) // Skip SEL ivars.
+ ID->getAttr<IBOutletAttr>()) // Skip IBOutlets.
continue;
containsPointerIvar = true;
OpenPOWER on IntegriCloud