Lines Matching refs:SrcExpr
59 : Self(S), SrcExpr(src), DestType(destType), in CastOperation()
82 ExprResult SrcExpr; member
150 Self.CheckCastAlign(SrcExpr.get(), DestType, OpRange); in checkCastAlign()
156 Expr *src = SrcExpr.get(); in checkObjCConversion()
160 SrcExpr = src; in checkObjCConversion()
168 SrcExpr = Self.CheckPlaceholderExpr(SrcExpr.get()); in checkNonOverloadPlaceholders()
169 if (SrcExpr.isInvalid()) in checkNonOverloadPlaceholders()
191 if (!Op.SrcExpr.isInvalid()) in ~CheckNoDerefRAII()
192 CheckNoDeref(Op.Self, Op.SrcExpr.get()->getType(), Op.ResultType, in ~CheckNoDerefRAII()
200 static void DiagnoseCastQual(Sema &Self, const ExprResult &SrcExpr,
214 static TryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr,
219 static TryCastResult TryStaticReferenceDowncast(Sema &Self, Expr *SrcExpr,
238 static TryCastResult TryStaticMemberPointerUpcast(Sema &Self, ExprResult &SrcExpr,
246 static TryCastResult TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr,
252 static TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr,
259 static TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr,
262 static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr,
266 static TryCastResult TryAddressSpaceCast(Sema &Self, ExprResult &SrcExpr,
316 if (Op.SrcExpr.isInvalid()) in BuildCXXNamedCast()
320 Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.get(), in BuildCXXNamedCast()
326 if (Op.SrcExpr.isInvalid()) in BuildCXXNamedCast()
331 Op.ValueKind, Op.SrcExpr.get(), DestTInfo, in BuildCXXNamedCast()
344 if (Op.SrcExpr.isInvalid()) in BuildCXXNamedCast()
348 Op.ValueKind, Op.Kind, Op.SrcExpr.get(), in BuildCXXNamedCast()
356 if (Op.SrcExpr.isInvalid()) in BuildCXXNamedCast()
361 Op.ValueKind, Op.Kind, Op.SrcExpr.get(), in BuildCXXNamedCast()
369 if (Op.SrcExpr.isInvalid()) in BuildCXXNamedCast()
375 Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.get(), in BuildCXXNamedCast()
404 if (Op.SrcExpr.isInvalid()) in BuildBuiltinBitCastExpr()
410 Op.SrcExpr.get(), TSI, KWLoc, RParenLoc); in BuildBuiltinBitCastExpr()
760 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckDynamicCast()
762 SrcExpr = Self.CheckPlaceholderExpr(SrcExpr.get()); in CheckDynamicCast()
763 if (SrcExpr.isInvalid()) // if conversion failed, don't report another error in CheckDynamicCast()
766 QualType OrigSrcType = SrcExpr.get()->getType(); in CheckDynamicCast()
782 SrcExpr = ExprError(); in CheckDynamicCast()
793 SrcExpr = ExprError(); in CheckDynamicCast()
799 SrcExpr = ExprError(); in CheckDynamicCast()
814 << OrigSrcType << this->DestType << SrcExpr.get()->getSourceRange(); in CheckDynamicCast()
815 SrcExpr = ExprError(); in CheckDynamicCast()
819 if (!SrcExpr.get()->isLValue()) { in CheckDynamicCast()
827 if (SrcExpr.get()->isPRValue()) in CheckDynamicCast()
828 SrcExpr = Self.CreateMaterializeTemporaryExpr( in CheckDynamicCast()
829 SrcType, SrcExpr.get(), /*IsLValueReference*/ false); in CheckDynamicCast()
837 SrcExpr.get())) { in CheckDynamicCast()
838 SrcExpr = ExprError(); in CheckDynamicCast()
843 << SrcPointee.getUnqualifiedType() << SrcExpr.get()->getSourceRange(); in CheckDynamicCast()
844 SrcExpr = ExprError(); in CheckDynamicCast()
858 SrcExpr = ExprError(); in CheckDynamicCast()
876 SrcExpr = ExprError(); in CheckDynamicCast()
889 << SrcPointee.getUnqualifiedType() << SrcExpr.get()->getSourceRange(); in CheckDynamicCast()
890 SrcExpr = ExprError(); in CheckDynamicCast()
898 SrcExpr = ExprError(); in CheckDynamicCast()
927 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckConstCast()
929 SrcExpr = Self.CheckPlaceholderExpr(SrcExpr.get()); in CheckConstCast()
930 if (SrcExpr.isInvalid()) // if conversion failed, don't report another error in CheckConstCast()
934 auto TCR = TryConstCast(Self, SrcExpr, DestType, /*CStyle*/ false, msg); in CheckConstCast()
937 << SrcExpr.get()->getType() << DestType << OpRange; in CheckConstCast()
940 SrcExpr = ExprError(); in CheckConstCast()
946 TryAddressSpaceCast(Self, SrcExpr, DestType, /*CStyle*/ false, msg, Kind); in CheckAddrspaceCast()
949 << CT_Addrspace << SrcExpr.get()->getType() << DestType << OpRange; in CheckAddrspaceCast()
952 SrcExpr = ExprError(); in CheckAddrspaceCast()
957 static void DiagnoseReinterpretUpDownCast(Sema &Self, const Expr *SrcExpr, in DiagnoseReinterpretUpDownCast() argument
960 QualType SrcType = SrcExpr->getType(); in DiagnoseReinterpretUpDownCast()
1062 static bool checkCastFunctionType(Sema &Self, const ExprResult &SrcExpr, in checkCastFunctionType() argument
1065 SrcExpr.get()->getExprLoc())) in checkCastFunctionType()
1068 QualType SrcType = SrcExpr.get()->getType(); in checkCastFunctionType()
1139 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckReinterpretCast()
1142 if (SrcExpr.isInvalid()) // if conversion failed, don't report another error in CheckReinterpretCast()
1147 TryReinterpretCast(Self, SrcExpr, DestType, in CheckReinterpretCast()
1150 if (SrcExpr.isInvalid()) // if conversion failed, don't report another error in CheckReinterpretCast()
1152 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in CheckReinterpretCast()
1155 << OverloadExpr::find(SrcExpr.get()).Expression->getName() in CheckReinterpretCast()
1157 Self.NoteAllOverloadCandidates(SrcExpr.get()); in CheckReinterpretCast()
1160 diagnoseBadCast(Self, msg, CT_Reinterpret, OpRange, SrcExpr.get(), in CheckReinterpretCast()
1168 DiagnoseReinterpretUpDownCast(Self, SrcExpr.get(), DestType, OpRange); in CheckReinterpretCast()
1170 if (!checkCastFunctionType(Self, SrcExpr, DestType)) in CheckReinterpretCast()
1172 << SrcExpr.get()->getType() << DestType << OpRange; in CheckReinterpretCast()
1174 SrcExpr = ExprError(); in CheckReinterpretCast()
1187 if (SrcExpr.isInvalid()) in CheckStaticCast()
1198 Self.ResolveAndFixSingleFunctionTemplateSpecialization(SrcExpr, in CheckStaticCast()
1202 if (SrcExpr.isInvalid()) in CheckStaticCast()
1206 SrcExpr = Self.IgnoredValueConversions(SrcExpr.get()); in CheckStaticCast()
1212 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckStaticCast()
1213 if (SrcExpr.isInvalid()) // if conversion failed, don't report another error in CheckStaticCast()
1219 = TryStaticCast(Self, SrcExpr, DestType, Sema::CCK_OtherCast, OpRange, msg, in CheckStaticCast()
1222 if (SrcExpr.isInvalid()) in CheckStaticCast()
1224 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in CheckStaticCast()
1225 OverloadExpr* oe = OverloadExpr::find(SrcExpr.get()).Expression; in CheckStaticCast()
1229 Self.NoteAllOverloadCandidates(SrcExpr.get()); in CheckStaticCast()
1231 diagnoseBadCast(Self, msg, CT_Static, OpRange, SrcExpr.get(), DestType, in CheckStaticCast()
1242 SrcExpr = ExprError(); in CheckStaticCast()
1260 static TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, in TryStaticCast() argument
1290 tcr = TryStaticReferenceDowncast(Self, SrcExpr.get(), DestType, CStyle, in TryStaticCast()
1298 tcr = TryLValueToRValueCast(Self, SrcExpr.get(), DestType, CStyle, Kind, in TryStaticCast()
1305 tcr = TryStaticImplicitCast(Self, SrcExpr, DestType, CCK, OpRange, msg, in TryStaticCast()
1307 if (SrcExpr.isInvalid()) in TryStaticCast()
1320 QualType SrcType = Self.Context.getCanonicalType(SrcExpr.get()->getType()); in TryStaticCast()
1351 SrcExpr = ExprError(); in TryStaticCast()
1379 tcr = TryStaticMemberPointerUpcast(Self, SrcExpr, SrcType, DestType, CStyle, in TryStaticCast()
1446 Self.CheckTollFreeBridgeStaticCast(DestType, SrcExpr.get(), Kind)) in TryStaticCast()
1459 SrcExpr = ExprError(); in TryStaticCast()
1470 TryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr, in TryLValueToRValueCast() argument
1481 if (!SrcExpr->isGLValue()) in TryLValueToRValueCast()
1487 QualType FromType = SrcExpr->getType(); in TryLValueToRValueCast()
1496 SrcExpr->getBeginLoc(), ToType, FromType, &RefConv); in TryLValueToRValueCast()
1503 msg = SrcExpr->isLValue() ? diag::err_bad_lvalue_to_rvalue_cast in TryLValueToRValueCast()
1512 if (!Self.IsDerivedFrom(SrcExpr->getBeginLoc(), SrcExpr->getType(), in TryLValueToRValueCast()
1525 TryStaticReferenceDowncast(Sema &Self, Expr *SrcExpr, QualType DestType, in TryStaticReferenceDowncast() argument
1543 if (!RValueRef && !SrcExpr->isLValue()) { in TryStaticReferenceDowncast()
1555 Self.Context.getCanonicalType(SrcExpr->getType()), in TryStaticReferenceDowncast()
1557 OpRange, SrcExpr->getType(), DestType, msg, Kind, in TryStaticReferenceDowncast()
1709 TryStaticMemberPointerUpcast(Sema &Self, ExprResult &SrcExpr, QualType SrcType, in TryStaticMemberPointerUpcast() argument
1720 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in TryStaticMemberPointerUpcast()
1722 = Self.ResolveAddressOfOverloadedFunction(SrcExpr.get(), DestType, false, in TryStaticMemberPointerUpcast()
1800 FunctionDecl *Fn = Self.ResolveAddressOfOverloadedFunction(SrcExpr.get(), in TryStaticMemberPointerUpcast()
1809 SrcExpr = Self.FixOverloadedFunctionReference(SrcExpr, FoundOverload, Fn); in TryStaticMemberPointerUpcast()
1810 if (!SrcExpr.isUsable()) { in TryStaticMemberPointerUpcast()
1827 TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, in TryStaticImplicitCast() argument
1849 Expr *SrcExprRaw = SrcExpr.get(); in TryStaticImplicitCast()
1876 SrcExpr = Result; in TryStaticImplicitCast()
1882 static TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, in TryConstCast() argument
1886 QualType SrcType = SrcExpr.get()->getType(); in TryConstCast()
1901 if (isa<LValueReferenceType>(DestTypeTmp) && !SrcExpr.get()->isLValue()) { in TryConstCast()
1909 if (isa<RValueReferenceType>(DestTypeTmp) && SrcExpr.get()->isPRValue()) { in TryConstCast()
1927 if (SrcExpr.get()->refersToBitField()) { in TryConstCast()
1973 SrcExpr = Self.CreateMaterializeTemporaryExpr(SrcExpr.get()->getType(), in TryConstCast()
1974 SrcExpr.get(), in TryConstCast()
2035 static void DiagnoseCastOfObjCSEL(Sema &Self, const ExprResult &SrcExpr, in DiagnoseCastOfObjCSEL() argument
2037 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseCastOfObjCSEL()
2046 Self.Diag(SrcExpr.get()->getExprLoc(), in DiagnoseCastOfObjCSEL()
2048 << SrcType << DestType << SrcExpr.get()->getSourceRange(); in DiagnoseCastOfObjCSEL()
2054 static void DiagnoseCallingConvCast(Sema &Self, const ExprResult &SrcExpr, in DiagnoseCallingConvCast() argument
2058 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseCallingConvCast()
2073 Expr *Src = SrcExpr.get()->IgnoreParenImpCasts(); in DiagnoseCallingConvCast()
2143 const Expr *SrcExpr, QualType DestType, in checkIntToPointerCast() argument
2145 QualType SrcType = SrcExpr->getType(); in checkIntToPointerCast()
2153 && !SrcExpr->isIntegerConstantExpr(Self.Context) in checkIntToPointerCast()
2196 static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, in TryReinterpretCast() argument
2204 QualType SrcType = SrcExpr.get()->getType(); in TryReinterpretCast()
2209 ExprResult FixedExpr = SrcExpr; in TryReinterpretCast()
2214 SrcExpr = FixedExpr; in TryReinterpretCast()
2215 SrcType = SrcExpr.get()->getType(); in TryReinterpretCast()
2219 if (!SrcExpr.get()->isGLValue()) { in TryReinterpretCast()
2236 switch (SrcExpr.get()->getObjectKind()) { in TryReinterpretCast()
2254 << OpRange << SrcExpr.get()->getSourceRange(); in TryReinterpretCast()
2255 msg = 0; SrcExpr = ExprError(); in TryReinterpretCast()
2425 checkIntToPointerCast(CStyle, OpRange, SrcExpr.get(), DestType, Self); in TryReinterpretCast()
2464 Kind = Self.PrepareCastToObjCObjectPointer(SrcExpr); in TryReinterpretCast()
2481 DiagnoseCastOfObjCSEL(Self, SrcExpr, DestType); in TryReinterpretCast()
2483 DiagnoseCallingConvCast(Self, SrcExpr, DestType, OpRange); in TryReinterpretCast()
2528 << CStyle << SrcType << DestType << SrcExpr.get()->getSourceRange(); in TryReinterpretCast()
2543 static TryCastResult TryAddressSpaceCast(Sema &Self, ExprResult &SrcExpr, in TryAddressSpaceCast() argument
2553 auto SrcType = SrcExpr.get()->getType(); in TryAddressSpaceCast()
2613 << SrcExpr.get()->getSourceRange(); in checkAddressSpaceCast()
2615 SrcExpr = ExprError(); in checkAddressSpaceCast()
2648 SrcExpr = Self.checkUnknownAnyCast(DestRange, DestType, in CheckCXXCStyleCast()
2649 SrcExpr.get(), Kind, in CheckCXXCStyleCast()
2655 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2667 SrcExpr, /* Decay Function to ptr */ false, in CheckCXXCStyleCast()
2670 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2674 SrcExpr = Self.IgnoredValueConversions(SrcExpr.get()); in CheckCXXCStyleCast()
2679 if (DestType->isDependentType() || SrcExpr.get()->isTypeDependent() || in CheckCXXCStyleCast()
2680 SrcExpr.get()->isValueDependent()) { in CheckCXXCStyleCast()
2687 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckCXXCStyleCast()
2688 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2695 (SrcExpr.get()->getType()->isIntegerType() || in CheckCXXCStyleCast()
2696 SrcExpr.get()->getType()->isFloatingType())) { in CheckCXXCStyleCast()
2698 SrcExpr = Self.prepareVectorSplat(DestType, SrcExpr.get()); in CheckCXXCStyleCast()
2715 TryCastResult tcr = TryConstCast(Self, SrcExpr, DestType, in CheckCXXCStyleCast()
2717 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2725 tcr = TryAddressSpaceCast(Self, SrcExpr, DestType, /*CStyle*/ true, msg, in CheckCXXCStyleCast()
2727 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2733 tcr = TryStaticCast(Self, SrcExpr, DestType, CCK, OpRange, msg, Kind, in CheckCXXCStyleCast()
2735 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2740 tcr = TryReinterpretCast(Self, SrcExpr, DestType, /*CStyle*/ true, in CheckCXXCStyleCast()
2742 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2753 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in CheckCXXCStyleCast()
2755 FunctionDecl *Fn = Self.ResolveAddressOfOverloadedFunction(SrcExpr.get(), in CheckCXXCStyleCast()
2763 OverloadExpr *OE = OverloadExpr::find(SrcExpr.get()).Expression; in CheckCXXCStyleCast()
2767 Self.NoteAllOverloadCandidates(SrcExpr.get()); in CheckCXXCStyleCast()
2771 OpRange, SrcExpr.get(), DestType, ListInitialization); in CheckCXXCStyleCast()
2779 if (!checkCastFunctionType(Self, SrcExpr, DestType)) in CheckCXXCStyleCast()
2781 << SrcExpr.get()->getType() << DestType << OpRange; in CheckCXXCStyleCast()
2784 SrcExpr = ExprError(); in CheckCXXCStyleCast()
2791 static void DiagnoseBadFunctionCast(Sema &Self, const ExprResult &SrcExpr, in DiagnoseBadFunctionCast() argument
2794 SrcExpr.get()->getExprLoc())) in DiagnoseBadFunctionCast()
2797 if (!isa<CallExpr>(SrcExpr.get())) in DiagnoseBadFunctionCast()
2800 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseBadFunctionCast()
2821 Self.Diag(SrcExpr.get()->getExprLoc(), in DiagnoseBadFunctionCast()
2823 << SrcType << DestType << SrcExpr.get()->getSourceRange(); in DiagnoseBadFunctionCast()
2832 SrcExpr = Self.checkUnknownAnyCast(DestRange, DestType, in CheckCStyleCast()
2833 SrcExpr.get(), Kind, in CheckCStyleCast()
2842 SrcExpr = Self.IgnoredValueConversions(SrcExpr.get()); in CheckCStyleCast()
2843 if (SrcExpr.isInvalid()) in CheckCStyleCast()
2853 (DestType->isDependentType() || SrcExpr.get()->isTypeDependent() || in CheckCStyleCast()
2854 SrcExpr.get()->isValueDependent())) { in CheckCStyleCast()
2855 assert((DestType->containsErrors() || SrcExpr.get()->containsErrors() || in CheckCStyleCast()
2856 SrcExpr.get()->containsErrors()) && in CheckCStyleCast()
2863 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in CheckCStyleCast()
2866 SrcExpr.get(), DestType, /*Complain=*/true, DAP)) in CheckCStyleCast()
2867 SrcExpr = Self.FixOverloadedFunctionReference(SrcExpr.get(), DAP, FD); in CheckCStyleCast()
2870 assert(SrcExpr.isUsable()); in CheckCStyleCast()
2872 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckCStyleCast()
2873 if (SrcExpr.isInvalid()) in CheckCStyleCast()
2875 QualType SrcType = SrcExpr.get()->getType(); in CheckCStyleCast()
2880 if (SrcExpr.isInvalid()) in CheckCStyleCast()
2885 SrcExpr = ExprError(); in CheckCStyleCast()
2910 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2920 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2925 << SrcType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2926 SrcExpr = ExprError(); in CheckCStyleCast()
2934 if (SrcExpr.get()->EvaluateAsInt(Result, Self.Context)) { in CheckCStyleCast()
2942 << toString(CastInt, 10) << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2943 SrcExpr = ExprError(); in CheckCStyleCast()
2950 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2951 SrcExpr = ExprError(); in CheckCStyleCast()
2960 Self.Diag(SrcExpr.get()->getExprLoc(), in CheckCStyleCast()
2962 << SrcType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2963 SrcExpr = ExprError(); in CheckCStyleCast()
2968 SrcExpr = Self.CheckExtVectorCast(OpRange, DestType, SrcExpr.get(), Kind); in CheckCStyleCast()
2974 SrcExpr = ExprError(); in CheckCStyleCast()
2982 SrcExpr = Self.prepareVectorSplat(DestType, SrcExpr.get()); in CheckCStyleCast()
2984 SrcExpr = ExprError(); in CheckCStyleCast()
2991 SrcExpr = ExprError(); in CheckCStyleCast()
3000 if (isa<ObjCSelectorExpr>(SrcExpr.get())) { in CheckCStyleCast()
3001 Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_selector_expr); in CheckCStyleCast()
3002 SrcExpr = ExprError(); in CheckCStyleCast()
3008 Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_to_bfloat16) in CheckCStyleCast()
3009 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3010 SrcExpr = ExprError(); in CheckCStyleCast()
3014 Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_from_bfloat16) in CheckCStyleCast()
3015 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3016 SrcExpr = ExprError(); in CheckCStyleCast()
3024 Self.Diag(SrcExpr.get()->getExprLoc(), in CheckCStyleCast()
3026 << SrcType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3027 SrcExpr = ExprError(); in CheckCStyleCast()
3030 checkIntToPointerCast(/* CStyle */ true, OpRange, SrcExpr.get(), DestType, in CheckCStyleCast()
3035 Self.Diag(SrcExpr.get()->getBeginLoc(), in CheckCStyleCast()
3037 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3038 SrcExpr = ExprError(); in CheckCStyleCast()
3065 Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_opencl_cast_to_half) in CheckCStyleCast()
3066 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3067 SrcExpr = ExprError(); in CheckCStyleCast()
3075 if (SrcExpr.isInvalid()) in CheckCStyleCast()
3086 Self.Diag(SrcExpr.get()->getBeginLoc(), in CheckCStyleCast()
3089 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3095 Self.Diag(SrcExpr.get()->getBeginLoc(), in CheckCStyleCast()
3097 << 1 << SrcType << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3098 SrcExpr = ExprError(); in CheckCStyleCast()
3103 if (!checkCastFunctionType(Self, SrcExpr, DestType)) in CheckCStyleCast()
3107 DiagnoseCastOfObjCSEL(Self, SrcExpr, DestType); in CheckCStyleCast()
3108 DiagnoseCallingConvCast(Self, SrcExpr, DestType, OpRange); in CheckCStyleCast()
3109 DiagnoseBadFunctionCast(Self, SrcExpr, DestType); in CheckCStyleCast()
3110 Kind = Self.PrepareScalarCast(SrcExpr, DestType); in CheckCStyleCast()
3111 if (SrcExpr.isInvalid()) in CheckCStyleCast()
3119 QualType SrcType = SrcExpr.get()->getType(); in CheckBuiltinBitCast()
3125 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3129 if (SrcExpr.get()->isPRValue()) in CheckBuiltinBitCast()
3130 SrcExpr = Self.CreateMaterializeTemporaryExpr(SrcType, SrcExpr.get(), in CheckBuiltinBitCast()
3138 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3145 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3152 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3161 static void DiagnoseCastQual(Sema &Self, const ExprResult &SrcExpr, in DiagnoseCastQual() argument
3163 if (SrcExpr.isInvalid()) in DiagnoseCastQual()
3166 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseCastQual()
3190 Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual2) in DiagnoseCastQual()
3193 Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual) in DiagnoseCastQual()
3212 if (Op.SrcExpr.isInvalid()) in BuildCStyleCastExpr()
3216 DiagnoseCastQual(Op.Self, Op.SrcExpr, Op.DestType); in BuildCStyleCastExpr()
3219 Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.get(), in BuildCStyleCastExpr()
3234 if (Op.SrcExpr.isInvalid()) in BuildCXXFunctionalCastExpr()
3237 auto *SubExpr = Op.SrcExpr.get(); in BuildCXXFunctionalCastExpr()
3245 Op.SrcExpr.get(), &Op.BasePath, CurFPFeatureOverrides(), LPLoc, RPLoc)); in BuildCXXFunctionalCastExpr()