diff options
author | Steve Naroff <snaroff@apple.com> | 2009-07-20 17:56:53 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-07-20 17:56:53 +0000 |
commit | 67ef8eaea8a0a2073147a8d863f0e3f30d525802 (patch) | |
tree | e69453c4480792194458bc049fe3a75af6c5a28b /lib/Sema/SemaExprObjC.cpp | |
parent | d33c868d386ef47c2942e2dbff0d9955a8591fa9 (diff) |
5 cleanups to ObjCObjectPointerType work:
- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76443 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 1d995b53e6..66e1beb983 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -854,34 +854,6 @@ bool Sema::ObjCQualifiedIdTypesAreCompatible(QualType lhs, QualType rhs, } return true; } - // FIXME: The code below will be removed when ObjCQualifiedInterfaceType is - // removed. - if (!lhs->isPointerType()) - return false; - - QualType ltype = lhs->getAsPointerType()->getPointeeType(); - if (const ObjCInterfaceType *lhsQI = - ltype->getAsObjCQualifiedInterfaceType()) { - ObjCObjectPointerType::qual_iterator LHSProtoI = lhsQI->qual_begin(); - ObjCObjectPointerType::qual_iterator LHSProtoE = lhsQI->qual_end(); - for (; LHSProtoI != LHSProtoE; ++LHSProtoI) { - bool match = false; - ObjCProtocolDecl *lhsProto = *LHSProtoI; - for (ObjCObjectPointerType::qual_iterator I = rhsQID->qual_begin(), - E = rhsQID->qual_end(); I != E; ++I) { - ObjCProtocolDecl *rhsProto = *I; - if (ProtocolCompatibleWithProtocol(lhsProto, rhsProto) || - (compare && ProtocolCompatibleWithProtocol(rhsProto, lhsProto))) { - match = true; - break; - } - } - if (!match) - return false; - } - return true; - } - return false; } |