analyzer: don't print the duplicate count by default
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 28 Feb 2020 15:06:57 +0000 (10:06 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 2 Mar 2020 21:45:04 +0000 (16:45 -0500)
commit13b7691238f189c7a233aedec49306a7cb2b0a15
tree5dc52bca9a149f2ca48fd9d35c8159014e21c4dd
parent6e4444078aec716aa8214c13d7d20292aa232b5b
analyzer: don't print the duplicate count by default

The note about duplicates attached to analyzer diagnostics feels like an
implementation detail; it's likely just noise from the perspective of an
end-user.

This patch disables it by default, introducing a flag to re-enable it.

gcc/analyzer/ChangeLog:
* 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.

gcc/ChangeLog:
* doc/invoke.texi (-fanalyzer-show-duplicate-count): New.

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c: Add
-fanalyzer-show-duplicate-count.
gcc/ChangeLog
gcc/analyzer/ChangeLog
gcc/analyzer/analyzer.opt
gcc/analyzer/diagnostic-manager.cc
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/analyzer/CVE-2005-1689-dedupe-issue.c