Files
clang-p2996/clang/test/SemaCXX/warn-infinite-recursion.cpp
Takuya Shimizu b3469ce6f8 [clang][Analysis] Handle && and || against variable and its negation as tautology
This patch introduces a new warning flag -Wtautological-negation-compare grouped in -Wtautological-compare that warns on the use of && or || operators against a variable and its negation.
e.g. x || !x and !x && x
This also makes the -Winfinite-recursion diagnose more cases.

Fixes https://github.com/llvm/llvm-project/issues/56035

Differential Revision: https://reviews.llvm.org/D152093
2023-08-17 17:55:48 +09:00

3.8 KiB