[cfe-commits] r50817 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Wed May 7 10:35:41 PDT 2008
Author: kremenek
Date: Wed May 7 12:35:41 2008
New Revision: 50817
URL: http://llvm.org/viewvc/llvm-project?rev=50817&view=rev
Log:
copy-paste: NS types are not typedefs.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=50817&r1=50816&r2=50817&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Wed May 7 12:35:41 2008
@@ -497,17 +497,15 @@
if (!T->isPointerType())
return false;
- // Check the typedef for the name "CF" and the substring "Ref".
+ ObjCInterfaceType* OT = dyn_cast<ObjCInterfaceType>(T.getTypePtr());
- TypedefType* TD = dyn_cast<TypedefType>(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;
More information about the cfe-commits
mailing list