@@ -555,8 +555,8 @@ static bool interp__builtin_isfpclass(InterpState &S, CodePtr OpPC,
555
555
APSInt FPClassArg = popToAPSInt (S.Stk , FPClassArgT);
556
556
const Floating &F = S.Stk .pop <Floating>();
557
557
558
- int32_t Result =
559
- static_cast < int32_t >(( F.classify () & FPClassArg).getZExtValue ());
558
+ int32_t Result = static_cast < int32_t >(
559
+ ( F.classify () & std::move ( FPClassArg) ).getZExtValue ());
560
560
pushInteger (S, Result, Call->getType ());
561
561
562
562
return true ;
@@ -856,7 +856,7 @@ static bool interp__builtin_overflowop(InterpState &S, CodePtr OpPC,
856
856
857
857
if (!APSInt::isSameValue (Temp, Result))
858
858
Overflow = true ;
859
- Result = Temp;
859
+ Result = std::move ( Temp) ;
860
860
}
861
861
862
862
// Write Result to ResultPtr and put Overflow on the stack.
@@ -1135,17 +1135,17 @@ static bool interp__builtin_is_aligned_up_down(InterpState &S, CodePtr OpPC,
1135
1135
1136
1136
if (isIntegralType (FirstArgT)) {
1137
1137
const APSInt &Src = popToAPSInt (S.Stk , FirstArgT);
1138
- APSInt Align = Alignment.extOrTrunc (Src.getBitWidth ());
1138
+ APInt AlignMinusOne = Alignment.extOrTrunc (Src.getBitWidth ()) - 1 ;
1139
1139
if (BuiltinOp == Builtin::BI__builtin_align_up) {
1140
1140
APSInt AlignedVal =
1141
- APSInt ((Src + (Align - 1 )) & ~(Align - 1 ) , Src.isUnsigned ());
1141
+ APSInt ((Src + AlignMinusOne) & ~AlignMinusOne , Src.isUnsigned ());
1142
1142
pushInteger (S, AlignedVal, Call->getType ());
1143
1143
} else if (BuiltinOp == Builtin::BI__builtin_align_down) {
1144
- APSInt AlignedVal = APSInt (Src & ~(Align - 1 ) , Src.isUnsigned ());
1144
+ APSInt AlignedVal = APSInt (Src & ~AlignMinusOne , Src.isUnsigned ());
1145
1145
pushInteger (S, AlignedVal, Call->getType ());
1146
1146
} else {
1147
1147
assert (*S.Ctx .classify (Call->getType ()) == PT_Bool);
1148
- S.Stk .push <Boolean>((Src & (Align - 1 ) ) == 0 );
1148
+ S.Stk .push <Boolean>((Src & AlignMinusOne ) == 0 );
1149
1149
}
1150
1150
return true ;
1151
1151
}
@@ -1425,7 +1425,7 @@ static bool interp__builtin_ia32_addcarry_subborrow(InterpState &S,
1425
1425
1426
1426
QualType CarryOutType = Call->getArg (3 )->getType ()->getPointeeType ();
1427
1427
PrimType CarryOutT = *S.getContext ().classify (CarryOutType);
1428
- assignInteger (S, CarryOutPtr, CarryOutT, APSInt (Result, true ));
1428
+ assignInteger (S, CarryOutPtr, CarryOutT, APSInt (std::move ( Result) , true ));
1429
1429
1430
1430
pushInteger (S, CarryOut, Call->getType ());
1431
1431
0 commit comments