Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ static std::string ComplexArithmeticStr(LangOptions::ComplexRangeKind Range) {

static void EmitComplexRangeDiag(const Driver &D, std::string str1,
std::string str2) {
if ((str1.compare(str2) != 0) && !str2.empty() && !str1.empty()) {
if (str1 != str2 && !str2.empty() && !str1.empty()) {
D.Diag(clang::diag::warn_drv_overriding_option) << str1 << str2;
}
}
Expand Down Expand Up @@ -2996,8 +2996,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
EmitComplexRangeDiag(D, RenderComplexRangeOption(Range),
"-fno-cx-limited-range");
} else {
if (GccRangeComplexOption.compare("-fcx-limited-range") != 0 &&
GccRangeComplexOption.compare("-fno-cx-fortran-rules") != 0)
if (GccRangeComplexOption != "-fcx-limited-range" &&
GccRangeComplexOption != "-fno-cx-fortran-rules")
EmitComplexRangeDiag(D, GccRangeComplexOption,
"-fno-cx-limited-range");
}
Expand Down Expand Up @@ -3042,8 +3042,8 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
break;
}
if (!GccRangeComplexOption.empty()) {
if (GccRangeComplexOption.compare("-fcx-limited-range") != 0) {
if (GccRangeComplexOption.compare("-fcx-fortran-rules") != 0) {
if (GccRangeComplexOption != "-fcx-limited-range") {
if (GccRangeComplexOption != "-fcx-fortran-rules") {
if (RangeVal != LangOptions::ComplexRangeKind::CX_Improved)
EmitComplexRangeDiag(D, GccRangeComplexOption,
ComplexArithmeticStr(RangeVal));
Expand Down
Loading