+2020-03-02 David Malcolm <dmalcolm@redhat.com>
+
+ * doc/invoke.texi (-fanalyzer-show-duplicate-count): New.
+
2020-03-02 David Malcolm <dmalcolm@redhat.com>
* doc/invoke.texi (Static Analyzer Options): Add
+2020-03-02 David Malcolm <dmalcolm@redhat.com>
+
+ * analyzer.opt (fanalyzer-show-duplicate-count): New option.
+ * diagnostic-manager.cc
+ (diagnostic_manager::emit_saved_diagnostic): Use the above to
+ guard the printing of the duplicate count.
+
2020-03-02 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93959
Common Var(flag_analyzer_fine_grained) Init(0)
Avoid combining multiple statements into one exploded edge.
+fanalyzer-show-duplicate-count
+Common Var(flag_analyzer_show_duplicate_count) Init(0)
+Issue a note when diagnostics are deduplicated.
+
fanalyzer-state-purge
Common Var(flag_analyzer_state_purge) Init(1)
Purge unneeded state during analysis.
auto_cfun sentinel (sd.m_snode->m_fun);
if (sd.m_d->emit (&rich_loc))
{
- if (num_dupes > 0)
+ if (flag_analyzer_show_duplicate_count && num_dupes > 0)
inform_n (stmt->location, num_dupes,
"%i duplicate", "%i duplicates",
num_dupes);
of multiple statements within a basic block. With
@option{-fanalyzer-fine-grained}, each statement gets its own edge.
+@item -fanalyzer-show-duplicate-count
+@opindex fanalyzer-show-duplicate-count
+@opindex fno-analyzer-show-duplicate-count
+This option is intended for analyzer developers: if multiple diagnostics
+have been detected as being duplicates of each other, it emits a note when
+reporting the best diagnostic, giving the number of additional diagnostics
+that were suppressed by the deduplication logic.
+
@item -fno-analyzer-state-merge
@opindex fanalyzer-state-merge
@opindex fno-analyzer-state-merge
+2020-03-02 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c: Add
+ -fanalyzer-show-duplicate-count.
+
2020-03-02 David Malcolm <dmalcolm@redhat.com>
PR analyzer/93959
+/* { dg-additional-options "-fanalyzer-show-duplicate-count" } */
+
#include <stdlib.h>
typedef struct _krb5_data {