void f(bool b)
{
if (false && b) {}
}
The code above will report the following:
<source>:3:18: warning: code will never be executed [-Wunreachable-code]
3 | if (false && b) {}
| ^
<source>:3:9: note: silence by adding parentheses to mark code as explicitly dead
3 | if (false && b) {}
| ^
| /* DISABLES CODE */ ( )
But addressing that as suggested will lead to a clang-tidy warning:
<source>:3:9: warning: redundant parentheses around expression [readability-redundant-parentheses]
3 | if ((false) && b) {}
| ^ ~
https://godbolt.org/z/nTvEGrr7c