@@ -743,14 +743,14 @@ std::optional<float> RootSignatureParser::parseFloatParam() {
743
743
std::optional<uint32_t > UInt = handleUIntLiteral ();
744
744
if (!UInt.has_value ())
745
745
return std::nullopt;
746
- return ( float ) UInt.value ();
746
+ return float ( UInt.value () );
747
747
}
748
748
749
749
if (Negated && tryConsumeExpectedToken (TokenKind::int_literal)) {
750
750
std::optional<int32_t > Int = handleIntLiteral (Negated);
751
751
if (!Int.has_value ())
752
752
return std::nullopt;
753
- return ( float ) Int.value ();
753
+ return float ( Int.value () );
754
754
}
755
755
756
756
if (tryConsumeExpectedToken (TokenKind::float_literal)) {
@@ -905,8 +905,7 @@ std::optional<int32_t> RootSignatureParser::handleIntLiteral(bool Negated) {
905
905
// GetIntegerValue will overwrite Val from the parsed Literal and return
906
906
// true if it overflows as a 32-bit unsigned int. Then check that it also
907
907
// doesn't overflow as a signed 32-bit int.
908
- int64_t MaxMagnitude =
909
- -static_cast <int64_t >(std::numeric_limits<int32_t >::min ());
908
+ int64_t MaxMagnitude = -int64_t (std::numeric_limits<int32_t >::min ());
910
909
if (Literal.GetIntegerValue (Val) || MaxMagnitude < Val.getExtValue ()) {
911
910
// Report that the value has overflowed
912
911
PP.getDiagnostics ().Report (CurToken.TokLoc ,
@@ -918,7 +917,7 @@ std::optional<int32_t> RootSignatureParser::handleIntLiteral(bool Negated) {
918
917
if (Negated)
919
918
Val = -Val;
920
919
921
- return static_cast < int32_t > (Val.getExtValue ());
920
+ return int32_t (Val.getExtValue ());
922
921
}
923
922
924
923
std::optional<float > RootSignatureParser::handleFloatLiteral (bool Negated) {
0 commit comments