Skip to content
Commit dfdfd306 authored by Shivam Gupta's avatar Shivam Gupta
Browse files

[Clang] Fix -Wconstant-logical-operand when LHS is a constant

This fix PR37919

The below code produces -Wconstant-logical-operand for the first statement,
but not the second.

void foo(int x) {
if (x && 5) {}
if (5 && x) {}
}

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D142609
parent f5768ec9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment