summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2019-10-19 00:57:23 +0000
committerRichard Trieu <rtrieu@google.com>2019-10-19 00:57:23 +0000
commit8b0d14a8f0cc085afa2a9c86c237da81c74517fc (patch)
tree10b826bafb00b240997f245466199e6350a9edd1 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentb081220cfd46965fa25dbf826cd3f42f4f9e54cd (diff)
downloadbcm5719-llvm-8b0d14a8f0cc085afa2a9c86c237da81c74517fc.tar.gz
bcm5719-llvm-8b0d14a8f0cc085afa2a9c86c237da81c74517fc.zip
New tautological warning for bitwise-or with non-zero constant always true.
Taking a value and the bitwise-or it with a non-zero constant will always result in a non-zero value. In a boolean context, this is always true. if (x | 0x4) {} // always true, intended '&' This patch creates a new warning group -Wtautological-bitwise-compare for this warning. It also moves in the existing tautological bitwise comparisons into this group. A few other changes were needed to the CFGBuilder so that all bool contexts would be checked. The warnings in -Wtautological-bitwise-compare will be off by default due to using the CFG. Fixes: https://bugs.llvm.org/show_bug.cgi?id=42666 Differential Revision: https://reviews.llvm.org/D66046 llvm-svn: 375318
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud