@@ -2199,8 +2199,8 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool UseGlobal,
2199
2199
if (getLangOpts().CPlusPlus14) {
2200
2200
assert(Context.getTargetInfo().getIntWidth() && "Builtin type of size 0?");
2201
2201
2202
- ConvertedSize = PerformImplicitConversion(*ArraySize, Context.getSizeType(),
2203
- AA_Converting );
2202
+ ConvertedSize = PerformImplicitConversion(
2203
+ *ArraySize, Context.getSizeType(), AssignmentAction::Converting );
2204
2204
2205
2205
if (!ConvertedSize.isInvalid() &&
2206
2206
(*ArraySize)->getType()->getAs<RecordType>())
@@ -3851,7 +3851,8 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal,
3851
3851
Context.getQualifiedType(Pointee.getUnqualifiedType(), Qs));
3852
3852
Ex = ImpCastExprToType(Ex.get(), Unqual, CK_NoOp);
3853
3853
}
3854
- Ex = PerformImplicitConversion(Ex.get(), ParamType, AA_Passing);
3854
+ Ex = PerformImplicitConversion(Ex.get(), ParamType,
3855
+ AssignmentAction::Passing);
3855
3856
if (Ex.isInvalid())
3856
3857
return ExprError();
3857
3858
}
@@ -4256,10 +4257,9 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
4256
4257
}
4257
4258
// Watch out for ellipsis conversion.
4258
4259
if (!ICS.UserDefined.EllipsisConversion) {
4259
- ExprResult Res =
4260
- PerformImplicitConversion(From, BeforeToType,
4261
- ICS.UserDefined.Before, AA_Converting,
4262
- CCK);
4260
+ ExprResult Res = PerformImplicitConversion(
4261
+ From, BeforeToType, ICS.UserDefined.Before,
4262
+ AssignmentAction::Converting, CCK);
4263
4263
if (Res.isInvalid())
4264
4264
return ExprError();
4265
4265
From = Res.get();
@@ -4282,7 +4282,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
4282
4282
return From;
4283
4283
4284
4284
return PerformImplicitConversion(From, ToType, ICS.UserDefined.After,
4285
- AA_Converting , CCK);
4285
+ AssignmentAction::Converting , CCK);
4286
4286
}
4287
4287
4288
4288
case ImplicitConversionSequence::AmbiguousConversion:
@@ -4451,19 +4451,19 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
4451
4451
// target entity shall allow at least the exceptions allowed by the
4452
4452
// source value in the assignment or initialization.
4453
4453
switch (Action) {
4454
- case AA_Assigning :
4455
- case AA_Initializing :
4454
+ case AssignmentAction::Assigning :
4455
+ case AssignmentAction::Initializing :
4456
4456
// Note, function argument passing and returning are initialization.
4457
- case AA_Passing :
4458
- case AA_Returning :
4459
- case AA_Sending :
4460
- case AA_Passing_CFAudited :
4457
+ case AssignmentAction::Passing :
4458
+ case AssignmentAction::Returning :
4459
+ case AssignmentAction::Sending :
4460
+ case AssignmentAction::Passing_CFAudited :
4461
4461
if (CheckExceptionSpecCompatibility(From, ToType))
4462
4462
return ExprError();
4463
4463
break;
4464
4464
4465
- case AA_Casting :
4466
- case AA_Converting :
4465
+ case AssignmentAction::Casting :
4466
+ case AssignmentAction::Converting :
4467
4467
// Casts and implicit conversions are not initialization, so are not
4468
4468
// checked for exception specification mismatches.
4469
4469
break;
@@ -4577,9 +4577,10 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
4577
4577
4578
4578
case ICK_Writeback_Conversion:
4579
4579
case ICK_Pointer_Conversion: {
4580
- if (SCS.IncompatibleObjC && Action != AA_Casting ) {
4580
+ if (SCS.IncompatibleObjC && Action != AssignmentAction::Casting ) {
4581
4581
// Diagnose incompatible Objective-C conversions
4582
- if (Action == AA_Initializing || Action == AA_Assigning)
4582
+ if (Action == AssignmentAction::Initializing ||
4583
+ Action == AssignmentAction::Assigning)
4583
4584
Diag(From->getBeginLoc(),
4584
4585
diag::ext_typecheck_convert_incompatible_pointer)
4585
4586
<< ToType << From->getType() << Action << From->getSourceRange()
@@ -4596,12 +4597,12 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
4596
4597
} else if (getLangOpts().allowsNonTrivialObjCLifetimeQualifiers() &&
4597
4598
!ObjC().CheckObjCARCUnavailableWeakConversion(ToType,
4598
4599
From->getType())) {
4599
- if (Action == AA_Initializing )
4600
+ if (Action == AssignmentAction::Initializing )
4600
4601
Diag(From->getBeginLoc(), diag::err_arc_weak_unavailable_assign);
4601
4602
else
4602
4603
Diag(From->getBeginLoc(), diag::err_arc_convesion_of_weak_unavailable)
4603
- << (Action == AA_Casting ) << From->getType() << ToType
4604
- << From->getSourceRange();
4604
+ << (Action == AssignmentAction::Casting ) << From->getType()
4605
+ << ToType << From->getSourceRange();
4605
4606
}
4606
4607
4607
4608
// Defer address space conversion to the third conversion.
@@ -6666,14 +6667,14 @@ static bool FindConditionalOverload(Sema &Self, ExprResult &LHS, ExprResult &RHS
6666
6667
// We found a match. Perform the conversions on the arguments and move on.
6667
6668
ExprResult LHSRes = Self.PerformImplicitConversion(
6668
6669
LHS.get(), Best->BuiltinParamTypes[0], Best->Conversions[0],
6669
- Sema::AA_Converting );
6670
+ AssignmentAction::Converting );
6670
6671
if (LHSRes.isInvalid())
6671
6672
break;
6672
6673
LHS = LHSRes;
6673
6674
6674
6675
ExprResult RHSRes = Self.PerformImplicitConversion(
6675
6676
RHS.get(), Best->BuiltinParamTypes[1], Best->Conversions[1],
6676
- Sema::AA_Converting );
6677
+ AssignmentAction::Converting );
6677
6678
if (RHSRes.isInvalid())
6678
6679
break;
6679
6680
RHS = RHSRes;
0 commit comments