aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-07-07 15:50:26 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2022-07-07 15:50:26 -0400
commit897b3b31f0a94b8bac59c6061655c6a32646d0a0 (patch)
tree65777b219fc02057535cf09d3f199d58a259e783 /libcpp
parentad6135e261ced29972e5aa33404e45bcdd99440f (diff)
downloadgcc-897b3b31f0a94b8bac59c6061655c6a32646d0a0.zip
gcc-897b3b31f0a94b8bac59c6061655c6a32646d0a0.tar.gz
gcc-897b3b31f0a94b8bac59c6061655c6a32646d0a0.tar.bz2
analyzer: fix false positives from -Wanalyzer-tainted-divisor [PR106225]
gcc/analyzer/ChangeLog: PR analyzer/106225 * sm-taint.cc (taint_state_machine::on_stmt): Move handling of assignments from division to... (taint_state_machine::check_for_tainted_divisor): ...this new function. Reject warning when the divisor is known to be non-zero. * sm.cc: Include "analyzer/program-state.h". (sm_context::get_old_region_model): New. * sm.h (sm_context::get_old_region_model): New decl. gcc/testsuite/ChangeLog: PR analyzer/106225 * gcc.dg/analyzer/taint-divisor-1.c: Add test coverage for various correct and incorrect checks against zero. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions