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()
1322 QualType SrcType = Self.Context.getCanonicalType(SrcExpr.get()->getType()); in TryStaticCast()
1353 SrcExpr = ExprError(); in TryStaticCast()
1381 tcr = TryStaticMemberPointerUpcast(Self, SrcExpr, SrcType, DestType, CStyle, in TryStaticCast()
1448 Self.CheckTollFreeBridgeStaticCast(DestType, SrcExpr.get(), Kind)) in TryStaticCast()
1461 SrcExpr = ExprError(); in TryStaticCast()
1472 TryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr, in TryLValueToRValueCast() argument
1483 if (!SrcExpr->isGLValue()) in TryLValueToRValueCast()
1489 QualType FromType = SrcExpr->getType(); in TryLValueToRValueCast()
1498 SrcExpr->getBeginLoc(), ToType, FromType, &RefConv); in TryLValueToRValueCast()
1505 msg = SrcExpr->isLValue() ? diag::err_bad_lvalue_to_rvalue_cast in TryLValueToRValueCast()
1514 if (!Self.IsDerivedFrom(SrcExpr->getBeginLoc(), SrcExpr->getType(), in TryLValueToRValueCast()
1527 TryStaticReferenceDowncast(Sema &Self, Expr *SrcExpr, QualType DestType, in TryStaticReferenceDowncast() argument
1545 if (!RValueRef && !SrcExpr->isLValue()) { in TryStaticReferenceDowncast()
1557 Self.Context.getCanonicalType(SrcExpr->getType()), in TryStaticReferenceDowncast()
1559 OpRange, SrcExpr->getType(), DestType, msg, Kind, in TryStaticReferenceDowncast()
1711 TryStaticMemberPointerUpcast(Sema &Self, ExprResult &SrcExpr, QualType SrcType, in TryStaticMemberPointerUpcast() argument
1722 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in TryStaticMemberPointerUpcast()
1724 = Self.ResolveAddressOfOverloadedFunction(SrcExpr.get(), DestType, false, in TryStaticMemberPointerUpcast()
1802 FunctionDecl *Fn = Self.ResolveAddressOfOverloadedFunction(SrcExpr.get(), in TryStaticMemberPointerUpcast()
1811 SrcExpr = Self.FixOverloadedFunctionReference(SrcExpr, FoundOverload, Fn); in TryStaticMemberPointerUpcast()
1812 if (!SrcExpr.isUsable()) { in TryStaticMemberPointerUpcast()
1829 TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, in TryStaticImplicitCast() argument
1851 Expr *SrcExprRaw = SrcExpr.get(); in TryStaticImplicitCast()
1878 SrcExpr = Result; in TryStaticImplicitCast()
1884 static TryCastResult TryConstCast(Sema &Self, ExprResult &SrcExpr, in TryConstCast() argument
1888 QualType SrcType = SrcExpr.get()->getType(); in TryConstCast()
1903 if (isa<LValueReferenceType>(DestTypeTmp) && !SrcExpr.get()->isLValue()) { in TryConstCast()
1911 if (isa<RValueReferenceType>(DestTypeTmp) && SrcExpr.get()->isPRValue()) { in TryConstCast()
1929 if (SrcExpr.get()->refersToBitField()) { in TryConstCast()
1975 SrcExpr = Self.CreateMaterializeTemporaryExpr(SrcExpr.get()->getType(), in TryConstCast()
1976 SrcExpr.get(), in TryConstCast()
2037 static void DiagnoseCastOfObjCSEL(Sema &Self, const ExprResult &SrcExpr, in DiagnoseCastOfObjCSEL() argument
2039 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseCastOfObjCSEL()
2048 Self.Diag(SrcExpr.get()->getExprLoc(), in DiagnoseCastOfObjCSEL()
2050 << SrcType << DestType << SrcExpr.get()->getSourceRange(); in DiagnoseCastOfObjCSEL()
2056 static void DiagnoseCallingConvCast(Sema &Self, const ExprResult &SrcExpr, in DiagnoseCallingConvCast() argument
2060 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseCallingConvCast()
2075 Expr *Src = SrcExpr.get()->IgnoreParenImpCasts(); in DiagnoseCallingConvCast()
2145 const Expr *SrcExpr, QualType DestType, in checkIntToPointerCast() argument
2147 QualType SrcType = SrcExpr->getType(); in checkIntToPointerCast()
2155 && !SrcExpr->isIntegerConstantExpr(Self.Context) in checkIntToPointerCast()
2198 static TryCastResult TryReinterpretCast(Sema &Self, ExprResult &SrcExpr, in TryReinterpretCast() argument
2206 QualType SrcType = SrcExpr.get()->getType(); in TryReinterpretCast()
2211 ExprResult FixedExpr = SrcExpr; in TryReinterpretCast()
2216 SrcExpr = FixedExpr; in TryReinterpretCast()
2217 SrcType = SrcExpr.get()->getType(); in TryReinterpretCast()
2221 if (!SrcExpr.get()->isGLValue()) { in TryReinterpretCast()
2238 switch (SrcExpr.get()->getObjectKind()) { in TryReinterpretCast()
2256 << OpRange << SrcExpr.get()->getSourceRange(); in TryReinterpretCast()
2257 msg = 0; SrcExpr = ExprError(); in TryReinterpretCast()
2427 checkIntToPointerCast(CStyle, OpRange, SrcExpr.get(), DestType, Self); in TryReinterpretCast()
2466 Kind = Self.PrepareCastToObjCObjectPointer(SrcExpr); in TryReinterpretCast()
2483 DiagnoseCastOfObjCSEL(Self, SrcExpr, DestType); in TryReinterpretCast()
2485 DiagnoseCallingConvCast(Self, SrcExpr, DestType, OpRange); in TryReinterpretCast()
2530 << CStyle << SrcType << DestType << SrcExpr.get()->getSourceRange(); in TryReinterpretCast()
2545 static TryCastResult TryAddressSpaceCast(Sema &Self, ExprResult &SrcExpr, in TryAddressSpaceCast() argument
2555 auto SrcType = SrcExpr.get()->getType(); in TryAddressSpaceCast()
2615 << SrcExpr.get()->getSourceRange(); in checkAddressSpaceCast()
2617 SrcExpr = ExprError(); in checkAddressSpaceCast()
2663 SrcExpr = Self.checkUnknownAnyCast(DestRange, DestType, in CheckCXXCStyleCast()
2664 SrcExpr.get(), Kind, in CheckCXXCStyleCast()
2670 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2682 SrcExpr, /* Decay Function to ptr */ false, in CheckCXXCStyleCast()
2685 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2689 SrcExpr = Self.IgnoredValueConversions(SrcExpr.get()); in CheckCXXCStyleCast()
2694 if (DestType->isDependentType() || SrcExpr.get()->isTypeDependent() || in CheckCXXCStyleCast()
2695 SrcExpr.get()->isValueDependent()) { in CheckCXXCStyleCast()
2702 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckCXXCStyleCast()
2703 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2710 SrcExpr.get()->getType())) { in CheckCXXCStyleCast()
2711 SrcExpr = ExprError(); in CheckCXXCStyleCast()
2715 (SrcExpr.get()->getType()->isIntegerType() || in CheckCXXCStyleCast()
2716 SrcExpr.get()->getType()->isFloatingType())) { in CheckCXXCStyleCast()
2718 SrcExpr = Self.prepareVectorSplat(DestType, SrcExpr.get()); in CheckCXXCStyleCast()
2736 TryCastResult tcr = TryConstCast(Self, SrcExpr, DestType, in CheckCXXCStyleCast()
2738 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2746 tcr = TryAddressSpaceCast(Self, SrcExpr, DestType, /*CStyle*/ true, msg, in CheckCXXCStyleCast()
2748 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2754 tcr = TryStaticCast(Self, SrcExpr, DestType, CCK, OpRange, msg, Kind, in CheckCXXCStyleCast()
2756 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2761 tcr = TryReinterpretCast(Self, SrcExpr, DestType, /*CStyle*/ true, in CheckCXXCStyleCast()
2763 if (SrcExpr.isInvalid()) in CheckCXXCStyleCast()
2774 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in CheckCXXCStyleCast()
2776 FunctionDecl *Fn = Self.ResolveAddressOfOverloadedFunction(SrcExpr.get(), in CheckCXXCStyleCast()
2784 OverloadExpr *OE = OverloadExpr::find(SrcExpr.get()).Expression; in CheckCXXCStyleCast()
2788 Self.NoteAllOverloadCandidates(SrcExpr.get()); in CheckCXXCStyleCast()
2792 OpRange, SrcExpr.get(), DestType, ListInitialization); in CheckCXXCStyleCast()
2800 if (!checkCastFunctionType(Self, SrcExpr, DestType)) in CheckCXXCStyleCast()
2802 << SrcExpr.get()->getType() << DestType << OpRange; in CheckCXXCStyleCast()
2805 SrcExpr = ExprError(); in CheckCXXCStyleCast()
2812 static void DiagnoseBadFunctionCast(Sema &Self, const ExprResult &SrcExpr, in DiagnoseBadFunctionCast() argument
2815 SrcExpr.get()->getExprLoc())) in DiagnoseBadFunctionCast()
2818 if (!isa<CallExpr>(SrcExpr.get())) in DiagnoseBadFunctionCast()
2821 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseBadFunctionCast()
2842 Self.Diag(SrcExpr.get()->getExprLoc(), in DiagnoseBadFunctionCast()
2844 << SrcType << DestType << SrcExpr.get()->getSourceRange(); in DiagnoseBadFunctionCast()
2853 SrcExpr = Self.checkUnknownAnyCast(DestRange, DestType, in CheckCStyleCast()
2854 SrcExpr.get(), Kind, in CheckCStyleCast()
2863 SrcExpr = Self.IgnoredValueConversions(SrcExpr.get()); in CheckCStyleCast()
2864 if (SrcExpr.isInvalid()) in CheckCStyleCast()
2874 (DestType->isDependentType() || SrcExpr.get()->isTypeDependent() || in CheckCStyleCast()
2875 SrcExpr.get()->isValueDependent())) { in CheckCStyleCast()
2876 assert((DestType->containsErrors() || SrcExpr.get()->containsErrors() || in CheckCStyleCast()
2877 SrcExpr.get()->containsErrors()) && in CheckCStyleCast()
2884 if (SrcExpr.get()->getType() == Self.Context.OverloadTy) { in CheckCStyleCast()
2887 SrcExpr.get(), DestType, /*Complain=*/true, DAP)) in CheckCStyleCast()
2888 SrcExpr = Self.FixOverloadedFunctionReference(SrcExpr.get(), DAP, FD); in CheckCStyleCast()
2891 assert(SrcExpr.isUsable()); in CheckCStyleCast()
2893 SrcExpr = Self.DefaultFunctionArrayLvalueConversion(SrcExpr.get()); in CheckCStyleCast()
2894 if (SrcExpr.isInvalid()) in CheckCStyleCast()
2896 QualType SrcType = SrcExpr.get()->getType(); in CheckCStyleCast()
2901 if (SrcExpr.isInvalid()) in CheckCStyleCast()
2906 SrcExpr = ExprError(); in CheckCStyleCast()
2931 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2941 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2946 << SrcType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2947 SrcExpr = ExprError(); in CheckCStyleCast()
2955 if (SrcExpr.get()->EvaluateAsInt(Result, Self.Context)) { in CheckCStyleCast()
2963 << toString(CastInt, 10) << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2964 SrcExpr = ExprError(); in CheckCStyleCast()
2971 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2972 SrcExpr = ExprError(); in CheckCStyleCast()
2981 Self.Diag(SrcExpr.get()->getExprLoc(), in CheckCStyleCast()
2983 << SrcType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
2984 SrcExpr = ExprError(); in CheckCStyleCast()
2989 SrcExpr = Self.CheckExtVectorCast(OpRange, DestType, SrcExpr.get(), Kind); in CheckCStyleCast()
2995 SrcExpr = ExprError(); in CheckCStyleCast()
3001 SrcExpr = ExprError(); in CheckCStyleCast()
3007 SrcExpr = Self.prepareVectorSplat(DestType, SrcExpr.get()); in CheckCStyleCast()
3009 SrcExpr = ExprError(); in CheckCStyleCast()
3016 SrcExpr = ExprError(); in CheckCStyleCast()
3025 if (isa<ObjCSelectorExpr>(SrcExpr.get())) { in CheckCStyleCast()
3026 Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_selector_expr); in CheckCStyleCast()
3027 SrcExpr = ExprError(); in CheckCStyleCast()
3033 Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_to_bfloat16) in CheckCStyleCast()
3034 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3035 SrcExpr = ExprError(); in CheckCStyleCast()
3039 Self.Diag(SrcExpr.get()->getExprLoc(), diag::err_cast_from_bfloat16) in CheckCStyleCast()
3040 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3041 SrcExpr = ExprError(); in CheckCStyleCast()
3049 Self.Diag(SrcExpr.get()->getExprLoc(), in CheckCStyleCast()
3051 << SrcType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3052 SrcExpr = ExprError(); in CheckCStyleCast()
3055 checkIntToPointerCast(/* CStyle */ true, OpRange, SrcExpr.get(), DestType, in CheckCStyleCast()
3060 Self.Diag(SrcExpr.get()->getBeginLoc(), in CheckCStyleCast()
3062 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3063 SrcExpr = ExprError(); in CheckCStyleCast()
3090 Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_opencl_cast_to_half) in CheckCStyleCast()
3091 << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3092 SrcExpr = ExprError(); in CheckCStyleCast()
3100 if (SrcExpr.isInvalid()) in CheckCStyleCast()
3111 Self.Diag(SrcExpr.get()->getBeginLoc(), in CheckCStyleCast()
3114 << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3120 Self.Diag(SrcExpr.get()->getBeginLoc(), in CheckCStyleCast()
3122 << 1 << SrcType << DestType << SrcExpr.get()->getSourceRange(); in CheckCStyleCast()
3123 SrcExpr = ExprError(); in CheckCStyleCast()
3128 if (!checkCastFunctionType(Self, SrcExpr, DestType)) in CheckCStyleCast()
3144 SrcExpr = ExprError(); in CheckCStyleCast()
3149 DiagnoseCastOfObjCSEL(Self, SrcExpr, DestType); in CheckCStyleCast()
3150 DiagnoseCallingConvCast(Self, SrcExpr, DestType, OpRange); in CheckCStyleCast()
3151 DiagnoseBadFunctionCast(Self, SrcExpr, DestType); in CheckCStyleCast()
3152 Kind = Self.PrepareScalarCast(SrcExpr, DestType); in CheckCStyleCast()
3153 if (SrcExpr.isInvalid()) in CheckCStyleCast()
3161 QualType SrcType = SrcExpr.get()->getType(); in CheckBuiltinBitCast()
3167 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3171 if (SrcExpr.get()->isPRValue()) in CheckBuiltinBitCast()
3172 SrcExpr = Self.CreateMaterializeTemporaryExpr(SrcType, SrcExpr.get(), in CheckBuiltinBitCast()
3180 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3187 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3194 SrcExpr = ExprError(); in CheckBuiltinBitCast()
3203 static void DiagnoseCastQual(Sema &Self, const ExprResult &SrcExpr, in DiagnoseCastQual() argument
3205 if (SrcExpr.isInvalid()) in DiagnoseCastQual()
3208 QualType SrcType = SrcExpr.get()->getType(); in DiagnoseCastQual()
3232 Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual2) in DiagnoseCastQual()
3235 Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual) in DiagnoseCastQual()
3254 if (Op.SrcExpr.isInvalid()) in BuildCStyleCastExpr()
3258 DiagnoseCastQual(Op.Self, Op.SrcExpr, Op.DestType); in BuildCStyleCastExpr()
3261 Context, Op.ResultType, Op.ValueKind, Op.Kind, Op.SrcExpr.get(), in BuildCStyleCastExpr()
3276 if (Op.SrcExpr.isInvalid()) in BuildCXXFunctionalCastExpr()
3279 auto *SubExpr = Op.SrcExpr.get(); in BuildCXXFunctionalCastExpr()
3287 Op.SrcExpr.get(), &Op.BasePath, CurFPFeatureOverrides(), LPLoc, RPLoc)); in BuildCXXFunctionalCastExpr()