[PATCH] D66046: Add new tautological compare warning for bitwise-or with a non-zero constant
Richard Trieu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 12 14:52:31 PDT 2019
rtrieu marked an inline comment as done.
rtrieu added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8161
+ "bitwise or with non-zero value always evaluates to true">,
+ InGroup<TautologicalBitwiseCompare>, DefaultIgnore;
def warn_tautological_overlap_comparison : Warning<
----------------
jfb wrote:
> Why default ignore?
This warning, like the tautological overlap warning, uses the CFG. CFG-based analysis are typically excluded from being default warnings due to the extra work of construction the CFG.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66046/new/
https://reviews.llvm.org/D66046
More information about the cfe-commits
mailing list