Home | History | Annotate | Download | only in Sema

Lines Matching defs:LHSType

991                                              ExprResult &RHS, QualType LHSType,
995 if (!handleIntegerToComplexFloatConversion(S, RHS, LHS, RHSType, LHSType,
997 return LHSType;
998 if (!handleIntegerToComplexFloatConversion(S, LHS, RHS, LHSType, RHSType,
1014 int Order = S.Context.getFloatingTypeOrder(LHSType, RHSType);
1016 auto *LHSComplexType = dyn_cast<ComplexType>(LHSType);
1019 LHSComplexType ? LHSComplexType->getElementType() : LHSType;
1078 ExprResult &RHS, QualType LHSType,
1080 bool LHSFloat = LHSType->isRealFloatingType();
1086 int order = S.Context.getFloatingTypeOrder(LHSType, RHSType);
1088 RHS = S.ImpCastExprToType(RHS.get(), LHSType, CK_FloatingCast);
1089 return LHSType;
1099 return handleIntToFloatConversion(S, LHS, RHS, LHSType, RHSType,
1103 return handleIntToFloatConversion(S, RHS, LHS, RHSType, LHSType,
1127 ExprResult &RHS, QualType LHSType,
1130 int order = S.Context.getIntegerTypeOrder(LHSType, RHSType);
1131 bool LHSSigned = LHSType->hasSignedIntegerRepresentation();
1136 RHS = (*doRHSCast)(S, RHS.get(), LHSType);
1137 return LHSType;
1145 RHS = (*doRHSCast)(S, RHS.get(), LHSType);
1146 return LHSType;
1150 } else if (S.Context.getIntWidth(LHSType) != S.Context.getIntWidth(RHSType)) {
1155 RHS = (*doRHSCast)(S, RHS.get(), LHSType);
1156 return LHSType;
1166 S.Context.getCorrespondingUnsignedType(LHSSigned ? LHSType : RHSType);
1177 ExprResult &RHS, QualType LHSType,
1180 const ComplexType *LHSComplexInt = LHSType->getAsComplexIntegerType();
1210 (S, LHS, RHS, LHSType, RHSEltType, IsCompAssign);
1237 QualType LHSType =
1243 if (const AtomicType *AtomicLHS = LHSType
1244 LHSType = AtomicLHS->getValueType();
1247 if (LHSType == RHSType)
1248 return LHSType;
1252 if (!LHSType->isArithmeticType() || !RHSType->isArithmeticType())
1256 QualType LHSUnpromotedType = LHSType;
1257 if (LHSType->isPromotableIntegerType())
1258 LHSType = Context.getPromotedIntegerType(LHSType);
1261 LHSType = LHSBitfieldPromoteTy;
1262 if (LHSType != LHSUnpromotedType && !IsCompAssign)
1263 LHS = ImpCastExprToType(LHS.get(), LHSType, CK_IntegralCast);
1266 if (LHSType == RHSType)
1267 return LHSType;
1272 if (LHSType->isComplexType() || RHSType->isComplexType())
1273 return handleComplexFloatConversion(*this, LHS, RHS, LHSType, RHSType,
1277 if (LHSType->isRealFloatingType() || RHSType->isRealFloatingType())
1278 return handleFloatConversion(*this, LHS, RHS, LHSType, RHSType,
1282 if (LHSType->isComplexIntegerType() || RHSType->isComplexIntegerType())
1283 return handleComplexIntConversion(*this, LHS, RHS, LHSType, RHSType,
1288 (*this, LHS, RHS, LHSType, RHSType, IsCompAssign);
5918 QualType LHSType =
5923 if (!LHSType->isIntegerType() && !LHSType->isRealFloatingType()) {
5925 << LHSType << LHS.get()->getSourceRange();
5936 if (LHSType == RHSType)
5937 return LHSType;
5940 if (LHSType->isRealFloatingType() || RHSType->isRealFloatingType())
5941 return handleFloatConversion(S, LHS, RHS, LHSType, RHSType,
5946 (S, LHS, RHS, LHSType, RHSType, /*IsCompAssign = */ false);
6532 checkPointerTypesForAssignment(Sema &S, QualType LHSType, QualType RHSType) {
6533 assert(LHSType.isCanonical() && "LHS not canonicalized!");
6540 cast<PointerType>(LHSType)->getPointeeType().split().asPair();
6656 checkBlockPointerTypesForAssignment(Sema &S, QualType LHSType,
6658 assert(LHSType.isCanonical() && "LHS not canonicalized!");
6664 lhptee = cast<BlockPointerType>(LHSType)->getPointeeType();
6677 if (!S.Context.typesAreBlockPointerCompatible(LHSType, RHSType))
6686 checkObjCPointerTypesForAssignment(Sema &S, QualType LHSType,
6688 assert(LHSType.isCanonical() && "LHS was not canonicalized!");
6691 if (LHSType->isObjCBuiltinType()) {
6693 if (LHSType->isObjCClassType() && !RHSType->isObjCBuiltinType() &&
6699 if (RHSType->isObjCClassType() && !LHSType->isObjCBuiltinType() &&
6700 !LHSType->isObjCQualifiedClassType())
6704 QualType lhptee = LHSType->getAs<ObjCObjectPointerType>()->getPointeeType();
6709 !LHSType->isObjCQualifiedIdType())
6712 if (S.Context.typesAreCompatible(LHSType, RHSType))
6714 if (LHSType->isObjCQualifiedIdType() || RHSType->isObjCQualifiedIdType())
6721 QualType LHSType, QualType RHSType) {
6730 return CheckAssignmentConstraints(LHSType, RHSPtr, K);
6751 Sema::CheckAssignmentConstraints(QualType LHSType, ExprResult &RHS,
6754 QualType OrigLHSType = LHSType;
6758 LHSType = Context.getCanonicalType(LHSType).getUnqualifiedType();
6762 if (LHSType == RHSType) {
6769 if (const AtomicType *AtomicTy = dyn_cast<AtomicType>(LHSType)) {
6785 // LHSType so that the resulting expression does not have reference
6787 if (const ReferenceType *LHSTypeRef = LHSType->getAs<ReferenceType>()) {
6797 if (LHSType->isExtVectorType()) {
6803 QualType elType = cast<ExtVectorType>(LHSType)->getElementType();
6814 if (LHSType->isVectorType() || RHSType->isVectorType()) {
6815 if (LHSType->isVectorType() && RHSType->isVectorType()) {
6818 if (Context.areCompatibleVectorTypes(LHSType, RHSType)) {
6826 if (isLaxVectorConversion(RHSType, LHSType)) {
6835 if (LHSType->isArithmeticType() && RHSType->isArithmeticType() &&
6836 !(getLangOpts().CPlusPlus && LHSType->isEnumeralType())) {
6837 Kind = PrepareScalarCast(RHS, LHSType);
6842 if (const PointerType *LHSPointer = dyn_cast<PointerType>(LHSType)) {
6848 return checkPointerTypesForAssignment(*this, LHSType, RHSType);
6868 Context.hasSameType(LHSType,
6890 if (isa<BlockPointerType>(LHSType)) {
6894 return checkBlockPointerTypesForAssignment(*this, LHSType, RHSType);
6920 if (isa<ObjCObjectPointerType>(LHSType)) {
6925 checkObjCPointerTypesForAssignment(*this, LHSType, RHSType);
6950 if (LHSType->isObjCClassType() &&
6961 isObjCPtrBlockCompatible(*this, Context, LHSType)) {
6973 if (LHSType == Context.BoolTy) {
6979 if (LHSType->isIntegerType()) {
6990 if (LHSType == Context.BoolTy) {
6996 if (LHSType->isIntegerType()) {
7005 if (isa<TagType>(LHSType) && isa<TagType>(RHSType)) {
7006 if (Context.typesAreCompatible(LHSType, RHSType)) {
7088 Sema::CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &RHS,
7092 if (!LHSType->isRecordType() && !LHSType->isAtomicType()) {
7098 Res = PerformImplicitConversion(RHS.get(), LHSType.getUnqualifiedType(),
7102 TryImplicitConversion(RHS.get(), LHSType.getUnqualifiedType(),
7110 Res = PerformImplicitConversion(RHS.get(), LHSType.getUnqualifiedType(),
7117 !CheckObjCARCUnavailableWeakConversion(LHSType,
7132 if ((LHSType->isPointerType() || LHSType->isObjCObjectPointerType() ||
7133 LHSType->isBlockPointerType()) &&
7138 CheckPointerConversion(RHS.get(), LHSType, Kind, Path, false);
7139 RHS = ImpCastExprToType(RHS.get(), LHSType, Kind, VK_RValue, &Path);
7149 if (!LHSType->isReferenceType()) {
7166 CheckAssignmentConstraints(LHSType, RHS, Kind);
7174 if (result != Incompatible && RHS.get()->getType() != LHSType) {
7175 QualType Ty = LHSType.getNonLValueExprType(Context);
7182 LHSType, E->getType(), E) ||
7183 ConversionToObjCStringLiteralCheck(LHSType, E))) {
7261 QualType LHSType = LHS.get()->getType().getUnqualifiedType();
7265 if (Context.hasSameType(LHSType, RHSType))
7266 return LHSType;
7268 const VectorType *LHSVecType = LHSType->getAs<VectorType>();
7274 Context.areCompatibleVectorTypes(LHSType, RHSType)) {
7276 RHS = ImpCastExprToType(RHS.get(), LHSType, CK_BitCast);
7277 return LHSType;
7289 LHSVecType->getElementType(), LHSType))
7290 return LHSType;
7294 LHSType, RHSVecType->getElementType(),
7303 if (isLaxVectorConversion(RHSType, LHSType)) {
7304 QualType resultType = LHSType;
7313 (!LHSVecType && !LHSType->isRealType())) {
7315 << LHSType << RHSType
7322 << LHSType << RHSType
7854 QualType LHSType) {
7890 LHSType->hasUnsignedIntegerRepresentation())
7910 << HexResult << LHSType
7916 << HexResult.str() << Result.getMinSignedBits() << LHSType
7942 QualType LHSType = LHS.get()->getType();
7943 const VectorType *LHSVecTy = LHSType->getAs<VectorType>();
7981 return LHSType;
8007 QualType LHSType = LHS.get()->getType();
8017 if (!LHSType->hasIntegerRepresentation() ||
8023 if (isScopedEnumerationType(LHSType) ||
8028 DiagnoseBadShiftValues(*this, LHS, RHS, Loc, Opc, LHSType);
8031 return LHSType;
8105 QualType LHSType = LHS.get()->getType();
8107 assert((LHSType->isPointerType() && RHSType->isPointerType()) ||
8108 (LHSType->isMemberPointerType() && RHSType->isMemberPointerType()));
8120 << LHSType << RHSType << T << LHS.get()->getSourceRange()
8363 QualType LHSType = LHS.get()->getType();
8372 if (!LHSType->hasFloatingRepresentation() &&
8373 !(LHSType->isBlockPointerType() && IsRelational) &&
8395 } else if (DL && DR && LHSType->isArrayType() && RHSType->isArrayType() &&
8452 LHSType = LHS.get()->getType();
8459 if (LHSType->isRealType() && RHSType->isRealType())
8463 if (LHSType->hasFloatingRepresentation())
8466 if (LHSType->isArithmeticType() && RHSType->isArithmeticType())
8489 if (LHSType->isPointerType() && RHSType->isPointerType()) { // C99 6.5.8p2
8491 LHSType->castAs<PointerType>()->getPointeeType().getCanonicalType();
8512 RHS = ImpCastExprToType(RHS.get(), LHSType, CK_BitCast);
8528 << LHSType << RHSType << LHS.get()->getSourceRange()
8543 const PointerType *lhsPtr = LHSType->getAs<PointerType>();
8547 << LHSType << RHSType << 0 /* comparison */
8557 RHS = ImpCastExprToType(RHS.get(), LHSType, Kind);
8564 if (LHSType->isNullPtrType() && RHSType->isNullPtrType())
8570 ((LHSType->isAnyPointerType() || LHSType->isNullPtrType()) ||
8572 (LHSType->isMemberPointerType() || LHSType->isBlockPointerType())))) {
8573 RHS = ImpCastExprToType(RHS.get(), LHSType,
8574 LHSType->isMemberPointerType()
8592 LHSType->isMemberPointerType() && RHSType->isMemberPointerType()) {
8608 if (!IsRelational && LHSType->isBlockPointerType() &&
8610 QualType lpointee = LHSType->castAs<BlockPointerType>()->getPointeeType();
8616 << LHSType << RHSType << LHS.get()->getSourceRange()
8619 RHS = ImpCastExprToType(RHS.get(), LHSType, CK_BitCast);
8625 && ((LHSType->isBlockPointerType() && RHSType->isPointerType())
8626 || (LHSType->isPointerType() && RHSType->isBlockPointerType()))) {
8630 || (LHSType->isPointerType() && LHSType->castAs<PointerType>()
8633 << LHSType << RHSType << LHS.get()->getSourceRange()
8641 RHS = ImpCastExprToType(RHS.get(), LHSType,
8642 LHSType->isPointerType() ? CK_BitCast
8647 if (LHSType->isObjCObjectPointerType() ||
8649 const PointerType *LPT = LHSType->getAs<PointerType>();
8656 !Context.typesAreCompatible(LHSType, RHSType)) {
8670 CheckObjCARCConversion(SourceRange(), LHSType, E, CCK_ImplicitConversion, false,
8672 RHS = ImpCastExprToType(E, LHSType,
8677 if (LHSType->isObjCObjectPointerType() &&
8679 if (!Context.areComparableObjCPointerTypes(LHSType, RHSType))
8688 RHS = ImpCastExprToType(RHS.get(), LHSType, CK_BitCast);
8692 if ((LHSType->isAnyPointerType() && RHSType->isIntegerType()) ||
8693 (LHSType->isIntegerType() && RHSType->isAnyPointerType())) {
8699 } else if ((LHSIsNull && LHSType->isIntegerType()) ||
8713 << LHSType << RHSType << LHS.get()->getSourceRange()
8719 if (LHSType->isIntegerType())
8723 RHS = ImpCastExprToType(RHS.get(), LHSType,
8730 && LHSType->isBlockPointerType() && RHSType->isIntegerType()) {
8731 RHS = ImpCastExprToType(RHS.get(), LHSType, CK_NullToPointer);
8735 && LHSType
8776 QualType LHSType = LHS.get()->getType();
8786 if (!LHSType->hasFloatingRepresentation() &&
8801 if (!IsRelational && LHSType->hasFloatingRepresentation()) {
8807 return GetSignedVectorType(LHSType);
9264 QualType LHSType = LHSExpr->getType();
9273 QualType LHSTy(LHSType);
9279 ((Context.isObjCNSObjectType(LHSType) &&
9282 LHSType->isObjCObjectPointerType())))
9286 LHSType->isObjCObjectType())
9288 << LHSType;
9312 if (LHSType.getObjCLifetime() == Qualifiers::OCL_Strong) {
9338 ConvTy = CheckAssignmentConstraints(Loc, LHSType, RHSType);
9341 if (DiagnoseAssignmentResult(ConvTy, Loc, LHSType, RHSType,
9355 ? LHSType : LHSType.getUnqualifiedType());