Clang is not triggering -Wtautological-constant-compare when using -std=c23 (original) (raw)
When compiling the minimal sample with any std flag (that i have tried) other than -std=c23, we get the warning:
warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
This warning is not triggered for c23.
This regression was introduced somewhere between 14.0.0 and 15.0.0.
I have never worked with LLVM before, but i have decided to take a stab at solving the issue.
My initial hunch is that its related to the introduction of built in bools, as that seemed to be introduced in 15.0.0.
Minimal example
int test() { if (1 << 5) { return 0; } return 1; }