diff options
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index af922d2fc3e..8d51639d22f 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/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") || |