diff options
author | Steve Naroff <snaroff@apple.com> | 2009-07-18 15:33:26 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-07-18 15:33:26 +0000 |
commit | c15cb2af27514ecc879daba9aa01389c5203685d (patch) | |
tree | 072dd33eca9d2903660f969e2cfcf5a5509d1da4 /lib/Sema/SemaType.cpp | |
parent | fb89cf05d388c789a07c74005ac473a4f952c069 (diff) |
Remove ObjCQualifiedInterfaceType:-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 036ccc8739..57989a021b 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -208,11 +208,12 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS, // FIXME: Adding a TST_objcInterface clause doesn't seem ideal, so we have // this "hack" for now... if (const ObjCInterfaceType *Interface = Result->getAsObjCInterfaceType()) - // FIXME: Remove ObjCQualifiedInterfaceType (by moving the list of - // protocols 'up' to ObjCInterfaceType). - Result = Context.getObjCQualifiedInterfaceType(Interface->getDecl(), - (ObjCProtocolDecl**)PQ, - DS.getNumProtocolQualifiers()); + // FIXME: Investigate removing the protocol list in ObjCInterfaceType. + // To simply this, Sema::GetTypeForDeclarator() uses the declspec + // protocol list, not the list we are storing here. + Result = Context.getObjCInterfaceType(Interface->getDecl(), + (ObjCProtocolDecl**)PQ, + DS.getNumProtocolQualifiers()); else if (Result->isObjCIdType()) // id<protocol-list> Result = Context.getObjCObjectPointerType(QualType(), @@ -900,10 +901,10 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip, // Build the type anyway. } if (getLangOptions().ObjC1 && T->isObjCInterfaceType()) { - const ObjCInterfaceType *OIT = T->getAsObjCInterfaceType(); + const DeclSpec &DS = D.getDeclSpec(); T = Context.getObjCObjectPointerType(T, - (ObjCProtocolDecl **)OIT->qual_begin(), - OIT->getNumProtocols()); + (ObjCProtocolDecl **)DS.getProtocolQualifiers(), + DS.getNumProtocolQualifiers()); break; } T = BuildPointerType(T, DeclType.Ptr.TypeQuals, DeclType.Loc, Name); |