@@ -13508,13 +13508,8 @@ static void DiagnoseFloatingImpCast(Sema &S, Expr *E, QualType T,
1350813508 }
1350913509}
1351013510
13511- static void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
13512- SourceLocation CC,
13513- bool *ICContext = nullptr,
13514- bool IsListInit = false);
13515-
1351613511/// Analyze the given compound assignment for the possible losing of
13517- /// floating-point precision and for implicit conversions for integral operands .
13512+ /// floating-point precision.
1351813513static void AnalyzeCompoundAssignment(Sema &S, BinaryOperator *E) {
1351913514 assert(isa<CompoundAssignOperator>(E) &&
1352013515 "Must be compound assignment operation");
@@ -13531,17 +13526,8 @@ static void AnalyzeCompoundAssignment(Sema &S, BinaryOperator *E) {
1353113526 ->getComputationResultType()
1353213527 ->getAs<BuiltinType>();
1353313528
13534- // Check for implicit conversions for compound assignment statements with
13535- // intergral operands.
13536- // FIXME: should this handle floating-point as well?
13537- if (E->getLHS()->getType()->isIntegerType() &&
13538- E->getRHS()->getType()->isIntegerType() && !E->isShiftAssignOp())
13539- CheckImplicitConversion(S, E->getRHS(), E->getType(),
13540- E->getRHS()->getExprLoc());
13541-
1354213529 // The below checks assume source is floating point.
13543- if (!ResultBT || !RBT || !RBT->isFloatingPoint())
13544- return;
13530+ if (!ResultBT || !RBT || !RBT->isFloatingPoint()) return;
1354513531
1354613532 // If source is floating point but target is an integer.
1354713533 if (ResultBT->isInteger())
@@ -13830,8 +13816,9 @@ static void DiagnoseIntInBoolContext(Sema &S, Expr *E) {
1383013816}
1383113817
1383213818static void CheckImplicitConversion(Sema &S, Expr *E, QualType T,
13833- SourceLocation CC, bool *ICContext,
13834- bool IsListInit) {
13819+ SourceLocation CC,
13820+ bool *ICContext = nullptr,
13821+ bool IsListInit = false) {
1383513822 if (E->isTypeDependent() || E->isValueDependent()) return;
1383613823
1383713824 const Type *Source = S.Context.getCanonicalType(E->getType()).getTypePtr();
0 commit comments