From 89bd0fc27dd5cac99c71e186f51f4bcf9b1eab9b Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 7 May 2008 17:35:41 +0000 Subject: copy-paste: NS types are not typedefs. llvm-svn: 50817 --- clang/lib/Analysis/CFRefCount.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'clang/lib/Analysis/CFRefCount.cpp') diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 8115cd7a746..5698dc8a21b 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -497,17 +497,15 @@ static bool isNSType(QualType T) { if (!T->isPointerType()) return false; - // Check the typedef for the name "CF" and the substring "Ref". - - TypedefType* TD = dyn_cast(T.getTypePtr()); + ObjCInterfaceType* OT = dyn_cast(T.getTypePtr()); - if (!TD) + if (!OT) return false; - const char* TDName = TD->getDecl()->getIdentifier()->getName(); - assert (TDName); + const char* ClsName = OT->getDecl()->getIdentifier()->getName(); + assert (ClsName); - if (TDName[0] != 'N' || TDName[1] != 'S') + if (ClsName[0] != 'N' || ClsName[1] != 'S') return false; return true; -- cgit v1.2.3