@@ -2838,7 +2838,7 @@ static std::string ComplexArithmeticStr(LangOptions::ComplexRangeKind Range) {
28382838
28392839static void EmitComplexRangeDiag (const Driver &D, std::string str1,
28402840 std::string str2) {
2841- if (( str1. compare (str2) != 0 ) && !str2.empty () && !str1.empty ()) {
2841+ if (str1 != str2 && !str2.empty () && !str1.empty ()) {
28422842 D.Diag (clang::diag::warn_drv_overriding_option) << str1 << str2;
28432843 }
28442844}
@@ -2996,8 +2996,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
29962996 EmitComplexRangeDiag (D, RenderComplexRangeOption (Range),
29972997 " -fno-cx-limited-range" );
29982998 } 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" )
30013001 EmitComplexRangeDiag (D, GccRangeComplexOption,
30023002 " -fno-cx-limited-range" );
30033003 }
@@ -3042,8 +3042,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
30423042 break ;
30433043 }
30443044 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" ) {
30473047 if (RangeVal != LangOptions::ComplexRangeKind::CX_Improved)
30483048 EmitComplexRangeDiag (D, GccRangeComplexOption,
30493049 ComplexArithmeticStr (RangeVal));
0 commit comments