aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-17 21:00:27 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-17 21:00:27 +0000
commit506b57e8b79d7dc2c367bf2ee7ec95420ad3fc8f (patch)
tree8d70cbc51dbea759e13389d30bc6cfc6bfe29923 /lib/Sema/SemaDeclAttr.cpp
parentdcf22ad88fdb6c4dd74f9065262cde8bac4f807b (diff)
Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed
out. The remaining ones are okay. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index af922d2fc3..8d51639d22 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -129,11 +129,11 @@ static inline bool isNSStringType(QualType T, ASTContext &Ctx) {
if (!PT)
return false;
- const ObjCInterfaceType *ClsT =PT->getPointeeType()->getAs<ObjCInterfaceType>();
- if (!ClsT)
+ ObjCInterfaceDecl *Cls = PT->getObjectType()->getInterface();
+ if (!Cls)
return false;
- IdentifierInfo* ClsName = ClsT->getDecl()->getIdentifier();
+ IdentifierInfo* ClsName = Cls->getIdentifier();
// FIXME: Should we walk the chain of classes?
return ClsName == &Ctx.Idents.get("NSString") ||