diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-07 17:35:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-07 17:35:41 +0000 |
commit | f4250e24bc339c55de335d50d564542433c5e2d2 (patch) | |
tree | eea1a7ffc82e5ada98a2ed1b70b406854eac3b59 /lib/Analysis/CFRefCount.cpp | |
parent | 1a42a2550a2db937ab3df863b771f13be34b66d6 (diff) |
copy-paste: NS types are not typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 8115cd7a74..5698dc8a21 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/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<TypedefType>(T.getTypePtr()); + ObjCInterfaceType* OT = dyn_cast<ObjCInterfaceType>(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; |