diff options
author | David Malcolm <dmalcolm@redhat.com> | 2023-09-15 13:47:42 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2023-09-15 13:47:42 -0400 |
commit | b09193fb0686b70ca26b7fa87f9d258503d63837 (patch) | |
tree | d3a89f43bb0fa693450c7a64c42f9924da89a0aa /libstdc++-v3/doc | |
parent | 759a1a52ea615df707f569246e5e15b5f12a2307 (diff) | |
download | gcc-b09193fb0686b70ca26b7fa87f9d258503d63837.zip gcc-b09193fb0686b70ca26b7fa87f9d258503d63837.tar.gz gcc-b09193fb0686b70ca26b7fa87f9d258503d63837.tar.bz2 |
analyzer: support diagnostics that don't have a stmt
gcc/analyzer/ChangeLog:
* analyzer.cc (get_stmt_location): Handle null stmt.
* diagnostic-manager.cc (saved_diagnostic::saved_diagnostic): Copy
m_loc from ploc.
(saved_diagnostic::operator==): Compare m_loc.
(saved_diagnostic::calc_best_epath): Only use m_stmt_finder if
m_loc is unknown.
(dedupe_key::dedupe_key): Initialize m_loc.
(dedupe_key::operator==): Compare m_loc.
(dedupe_key::get_location): Use m_loc if it's known.
(dedupe_key::m_loc): New field.
(diagnostic_manager::emit_saved_diagnostic): Only call
get_emission_location if m_loc is unknown, preferring to use m_loc
if it's available.
* diagnostic-manager.h (saved_diagnostic::m_loc): New field.
(pending_location::pending_location): Initialize m_loc. Add
overload taking a location_t rather than a stmt/stmt_finder.
(pending_location::m_loc): New field.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libstdc++-v3/doc')
0 files changed, 0 insertions, 0 deletions