summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-05-07 17:35:41 +0000
committerTed Kremenek <kremenek@apple.com>2008-05-07 17:35:41 +0000
commit89bd0fc27dd5cac99c71e186f51f4bcf9b1eab9b (patch)
tree94fbc1b6ebee857c0fd6395d26af2239307493a7 /clang/lib/Analysis/CFRefCount.cpp
parent456c0f67388735b42034cca7466d8d0de7ca3902 (diff)
downloadbcm5719-llvm-89bd0fc27dd5cac99c71e186f51f4bcf9b1eab9b.tar.gz
bcm5719-llvm-89bd0fc27dd5cac99c71e186f51f4bcf9b1eab9b.zip
copy-paste: NS types are not typedefs.
llvm-svn: 50817
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp12
1 files changed, 5 insertions, 7 deletions
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<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;
OpenPOWER on IntegriCloud