@@ -2838,7 +2838,7 @@ static std::string ComplexArithmeticStr(LangOptions::ComplexRangeKind Range) {
2838
2838
2839
2839
static void EmitComplexRangeDiag (const Driver &D, std::string str1,
2840
2840
std::string str2) {
2841
- if (( str1. compare (str2) != 0 ) && !str2.empty () && !str1.empty ()) {
2841
+ if (str1 != str2 && !str2.empty () && !str1.empty ()) {
2842
2842
D.Diag (clang::diag::warn_drv_overriding_option) << str1 << str2;
2843
2843
}
2844
2844
}
@@ -2996,8 +2996,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
2996
2996
EmitComplexRangeDiag (D, RenderComplexRangeOption (Range),
2997
2997
" -fno-cx-limited-range" );
2998
2998
} else {
2999
- if (GccRangeComplexOption. compare ( " -fcx-limited-range" ) != 0 &&
3000
- GccRangeComplexOption. compare ( " -fno-cx-fortran-rules" ) != 0 )
2999
+ if (GccRangeComplexOption != " -fcx-limited-range" &&
3000
+ GccRangeComplexOption != " -fno-cx-fortran-rules" )
3001
3001
EmitComplexRangeDiag (D, GccRangeComplexOption,
3002
3002
" -fno-cx-limited-range" );
3003
3003
}
@@ -3042,8 +3042,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
3042
3042
break ;
3043
3043
}
3044
3044
if (!GccRangeComplexOption.empty ()) {
3045
- if (GccRangeComplexOption. compare ( " -fcx-limited-range" ) != 0 ) {
3046
- if (GccRangeComplexOption. compare ( " -fcx-fortran-rules" ) != 0 ) {
3045
+ if (GccRangeComplexOption != " -fcx-limited-range" ) {
3046
+ if (GccRangeComplexOption != " -fcx-fortran-rules" ) {
3047
3047
if (RangeVal != LangOptions::ComplexRangeKind::CX_Improved)
3048
3048
EmitComplexRangeDiag (D, GccRangeComplexOption,
3049
3049
ComplexArithmeticStr (RangeVal));
0 commit comments