diff options
author | benjamin priour <vultkayn@gcc.gnu.org> | 2023-09-01 20:21:41 +0200 |
---|---|---|
committer | benjamin priour <vultkayn@gcc.gnu.org> | 2023-09-07 23:00:56 +0200 |
commit | 7d2274b9e346f44f8f6598b9dbb9fa95259274a2 (patch) | |
tree | 764c4e58e09e1c4e1ed70fcbec760b34f67f80fb /gcc/value-range.h | |
parent | 18f1f79ec5b1f1b3e3c43ff5645a9a5671655221 (diff) | |
download | gcc-7d2274b9e346f44f8f6598b9dbb9fa95259274a2.zip gcc-7d2274b9e346f44f8f6598b9dbb9fa95259274a2.tar.gz gcc-7d2274b9e346f44f8f6598b9dbb9fa95259274a2.tar.bz2 |
analyzer: Call off a superseding when diagnostics are unrelated [PR110830]
Before this patch, a saved_diagnostic would supersede another at
the same statement if and only its vfunc supercedes_p returned true
for the other diagnostic's kind.
That both warning were unrelated - i.e. resolving one would not fix
the other - was not considered in making the above choice.
This patch makes it so that two saved_diagnostics taking a different
outcome of at least one common conditional branching cannot supersede
each other.
Signed-off-by: Benjamin Priour <vultkayn@gcc.gnu.org>
Co-authored-by: David Malcolm <dmalcolm@redhat.com>
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/ChangeLog:
PR analyzer/110830
* diagnostic-manager.cc
(compatible_epaths_p): New function.
(saved_diagnostic::supercedes_p): Now calls the above
to determine if the diagnostics do overlap and the superseding
may proceed.
gcc/testsuite/ChangeLog:
PR analyzer/110830
* c-c++-common/analyzer/pr110830.c: New test.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions