|
@@ -7511,7 +7511,7 @@ Sema::CheckAssignmentConstraints(SourceLocation Loc,
|
|
// usually happen on valid code.
|
|
// usually happen on valid code.
|
|
OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue);
|
|
OpaqueValueExpr RHSExpr(Loc, RHSType, VK_RValue);
|
|
ExprResult RHSPtr = &RHSExpr;
|
|
ExprResult RHSPtr = &RHSExpr;
|
|
- CastKind K = CK_Invalid;
|
|
|
|
|
|
+ CastKind K;
|
|
|
|
|
|
return CheckAssignmentConstraints(LHSType, RHSPtr, K, /*ConvertRHS=*/false);
|
|
return CheckAssignmentConstraints(LHSType, RHSPtr, K, /*ConvertRHS=*/false);
|
|
}
|
|
}
|
|
@@ -7903,7 +7903,7 @@ Sema::CheckTransparentUnionArgumentConstraints(QualType ArgType,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- CastKind Kind = CK_Invalid;
|
|
|
|
|
|
+ CastKind Kind;
|
|
if (CheckAssignmentConstraints(it->getType(), RHS, Kind)
|
|
if (CheckAssignmentConstraints(it->getType(), RHS, Kind)
|
|
== Compatible) {
|
|
== Compatible) {
|
|
RHS = ImpCastExprToType(RHS.get(), it->getType(), Kind);
|
|
RHS = ImpCastExprToType(RHS.get(), it->getType(), Kind);
|
|
@@ -8019,7 +8019,7 @@ Sema::CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &CallerRHS,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- CastKind Kind = CK_Invalid;
|
|
|
|
|
|
+ CastKind Kind;
|
|
Sema::AssignConvertType result =
|
|
Sema::AssignConvertType result =
|
|
CheckAssignmentConstraints(LHSType, RHS, Kind, ConvertRHS);
|
|
CheckAssignmentConstraints(LHSType, RHS, Kind, ConvertRHS);
|
|
|
|
|
|
@@ -8114,7 +8114,7 @@ static bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar,
|
|
unsigned &DiagID) {
|
|
unsigned &DiagID) {
|
|
// The conversion to apply to the scalar before splatting it,
|
|
// The conversion to apply to the scalar before splatting it,
|
|
// if necessary.
|
|
// if necessary.
|
|
- CastKind scalarCast = CK_Invalid;
|
|
|
|
|
|
+ CastKind scalarCast = CK_NoOp;
|
|
|
|
|
|
if (vectorEltTy->isIntegralType(S.Context)) {
|
|
if (vectorEltTy->isIntegralType(S.Context)) {
|
|
if (S.getLangOpts().OpenCL && (scalarTy->isRealFloatingType() ||
|
|
if (S.getLangOpts().OpenCL && (scalarTy->isRealFloatingType() ||
|
|
@@ -8145,7 +8145,7 @@ static bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar,
|
|
|
|
|
|
// Adjust scalar if desired.
|
|
// Adjust scalar if desired.
|
|
if (scalar) {
|
|
if (scalar) {
|
|
- if (scalarCast != CK_Invalid)
|
|
|
|
|
|
+ if (scalarCast != CK_NoOp)
|
|
*scalar = S.ImpCastExprToType(scalar->get(), vectorEltTy, scalarCast);
|
|
*scalar = S.ImpCastExprToType(scalar->get(), vectorEltTy, scalarCast);
|
|
*scalar = S.ImpCastExprToType(scalar->get(), vectorTy, CK_VectorSplat);
|
|
*scalar = S.ImpCastExprToType(scalar->get(), vectorTy, CK_VectorSplat);
|
|
}
|
|
}
|