Skip to content

Commit

Permalink
[clang] Silence -Wlogical-op-parentheses in Clang.cpp (NFC)
Browse files Browse the repository at this point in the history
llvm-project/clang/lib/Driver/ToolChains/Clang.cpp:2721:49:
error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
        !Option.empty() && !NegateFortranOption && !NegateLimitedOption)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
llvm-project/clang/lib/Driver/ToolChains/Clang.cpp:2721:49:
note: place parentheses around the '&&' expression to silence this warning
        !Option.empty() && !NegateFortranOption && !NegateLimitedOption)
                                                ^
        (                                                              )
1 error generated.
  • Loading branch information
DamonFool committed Mar 12, 2024
1 parent ee137e2 commit f03aaa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2718,7 +2718,7 @@ static void EmitComplexRangeDiag(const Driver &D,
Option == "-fno-cx-limited-range";
}
if (Option.empty() ||
!Option.empty() && !NegateFortranOption && !NegateLimitedOption)
(!Option.empty() && !NegateFortranOption && !NegateLimitedOption))
D.Diag(clang::diag::warn_drv_overriding_option)
<< EnumComplexRangeToStr(Range1, Option)
<< EnumComplexRangeToStr(Range2, Option);
Expand Down

0 comments on commit f03aaa3

Please sign in to comment.