Lines Matching defs:RHS

3448                             const ObjCProtocolDecl *RHS) {
3449 return LHS->getDeclName() < RHS->getDeclName();
4365 /// '_Complex double'). If LHS > RHS, return 1. If LHS == RHS, return 0. If
4366 /// LHS < RHS, return -1.
4367 int ASTContext::getFloatingTypeOrder(QualType LHS, QualType RHS) const {
4369 FloatingRank RHSR = getFloatingRank(RHS);
4516 /// C99 6.3.1.8p1. If LHS > RHS, return 1. If LHS == RHS, return 0. If
4517 /// LHS < RHS, return -1.
4518 int ASTContext::getIntegerTypeOrder(QualType LHS, QualType RHS) const {
4520 const Type *RHSC = getCanonicalType(RHS).getTypePtr();
4541 // Otherwise, the LHS is signed and the RHS is unsigned or visa versa.
4553 // If the unsigned [RHS] type is larger, return it.
6362 const VectorType *RHS) {
6363 assert(LHS->isCanonicalUnqualified() && RHS->isCanonicalUnqualified());
6364 return LHS->getElementType() == RHS->getElementType() &&
6365 LHS->getNumElements() == RHS->getNumElements();
6448 // If the RHS is a unqualified interface pointer "NSString*",
6476 // If the RHS is a qualified interface pointer "NSString<P>*",
6497 assert(rhsQID && "One of the LHS/RHS should be id<x>");
6550 /// compatible for assignment from RHS to LHS. This handles validation of any
6551 /// protocol qualifiers on the LHS or RHS.
6556 const ObjCObjectType* RHS = RHSOPT->getObjectType();
6560 RHS->isObjCUnqualifiedIdOrClass())
6563 if (LHS->isObjCQualifiedId() || RHS->isObjCQualifiedId())
6568 if (LHS->isObjCQualifiedClass() && RHS->isObjCQualifiedClass())
6573 if (LHS->getInterface() && RHS->getInterface())
6574 return canAssignObjCInterfaces(LHS, RHS);
6601 const ObjCInterfaceType* RHS = RHSOPT->getInterfaceType();
6602 if (LHS && RHS) { // We have 2 user-defined types.
6603 if (LHS != RHS) {
6604 if (LHS->getDecl()->isSuperClassOf(RHS->getDecl()))
6606 if (RHS->getDecl()->isSuperClassOf(LHS->getDecl()))
6626 const ObjCObjectType* RHS = RHSOPT->getObjectType();
6628 assert(RHS->getInterface() && "RHS must have an interface base");
6642 unsigned RHSNumProtocols = RHS->getNumProtocols();
6645 const_cast<ObjCProtocolDecl **>(RHS->qual_begin());
6651 Context.CollectInheritedProtocols(RHS->getInterface(),
6669 const ObjCObjectType *RHS = Rptr->getObjectType();
6671 const ObjCInterfaceDecl* RDecl = RHS->getInterface();
6677 if (canAssignObjCInterfaces(LHS, RHS)) {
6693 const ObjCObjectType *RHS) {
6695 assert(RHS->getInterface() && "RHS is not an interface type");
6697 // Verify that the base decls are compatible: the RHS must be a subclass of
6699 if (!LHS->getInterface()->isSuperClassOf(RHS->getInterface()))
6702 // RHS must have a superset of the protocols in the LHS. If the LHS is not
6707 // Okay, we know the LHS has protocol qualifiers. If the RHS doesn't,
6709 if (RHS->getNumProtocols() == 0) {
6710 // OK, if LHS is a superclass of RHS *and*
6714 LHS->getInterface()->isSuperClassOf(RHS->getInterface());
6721 CollectInheritedProtocols(RHS->getInterface(), SuperClassInheritedProtocols);
6745 // If the RHS doesn't implement the protocol on the left, the types
6747 for (auto *RHSPI : RHS->quals()) {
6757 // The RHS implements all protocols listed on the LHS.
6761 bool ASTContext::areComparableObjCPointerTypes(QualType LHS, QualType RHS) {
6764 const ObjCObjectPointerType *RHSOPT = RHS->getAs<ObjCObjectPointerType>();
6783 bool ASTContext::typesAreCompatible(QualType LHS, QualType RHS,
6786 return hasSameType(LHS, RHS);
6788 return !mergeTypes(LHS, RHS, false, CompareUnqualified).isNull();
6791 bool ASTContext::propertyTypesAreCompatible(QualType LHS, QualType RHS) {
6792 return typesAreCompatible(LHS, RHS);
6795 bool ASTContext::typesAreBlockPointerCompatible(QualType LHS, QualType RHS) {
6796 return !mergeTypes(LHS, RHS, true).isNull();
6854 QualType RHS = rbase->getReturnType();
6858 UnqualifiedResult = (!RHS.hasQualifiers() && LHS.hasQualifiers());
6859 retType = mergeTypes(LHS, RHS, true, UnqualifiedResult, true);
7024 QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
7033 assert(!RHS->getAs<ReferenceType>() && "RHS is a reference type?");
7037 RHS = RHS.getUnqualifiedType();
7041 RHSCan = getCanonicalType(RHS);
7071 return mergeTypes(LHS, getObjCGCQualType(RHS, Qualifiers::Strong));
7074 return mergeTypes(getObjCGCQualType(LHS, Qualifiers::Strong), RHS);
7108 return mergeEnumWithInteger(*this, ETy, RHS, false);
7110 if (const EnumType* ETy = RHS->getAs<EnumType>()) {
7115 if (LHS->isObjCIdType() && RHS->isBlockPointerType())
7117 if (RHS->isObjCIdType() && LHS->isBlockPointerType())
7118 return RHS;
7151 QualType RHSPointee = RHS->getAs<PointerType>()->getPointeeType();
7162 return RHS;
7169 QualType RHSPointee = RHS->getAs<BlockPointerType>()->getPointeeType();
7180 return RHS;
7187 QualType RHSValue = RHS->getAs<AtomicType>()->getValueType();
7198 return RHS;
7204 const ConstantArrayType* RCAT = getAsConstantArrayType(RHS);
7209 QualType RHSElem = getAsArrayType(RHS)->getElementType();
7220 return RHS;
7226 const VariableArrayType* RVAT = getAsVariableArrayType(RHS);
7230 return RHS;
7239 // the array's size has to be the size of RHS, but the type
7241 return RHS;
7244 if (getCanonicalType(RHSElem) == getCanonicalType(ResultType)) return RHS;
7249 return mergeFunctionTypes(LHS, RHS, OfBlockPointer, Unqualified);
7268 // "LHS x; RHS x;" at global scope is legal.
7270 const ObjCObjectType* RHSIface = RHS->getAs<ObjCObjectType>();
7280 RHS->getAs<ObjCObjectPointerType>(),
7286 RHS->getAs<ObjCObjectPointerType>()))
7315 /// 'RHS' attributes and returns the merged version; including for function
7317 QualType ASTContext::mergeObjCGCQualifiers(QualType LHS, QualType RHS) {
7319 RHSCan = getCanonicalType(RHS);
7373 return RHS;
7379 QualType RHSBaseQT = RHS->getAs<ObjCObjectPointerType>()->getPointeeType();
7384 return RHS;