diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-09-20 18:51:55 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-09-20 18:51:55 -0400 |
commit | 725231e16768bd9f16169b3b7e4cb5a98b251d1c (patch) | |
tree | e3e18feb20a4ace81c2d8af1d5dfc70ece0eb0ce /gcc/analyzer/program-state.cc | |
parent | 7da682c896f949259eaf820be17b5781df2cbead (diff) | |
download | gcc-725231e16768bd9f16169b3b7e4cb5a98b251d1c.zip gcc-725231e16768bd9f16169b3b7e4cb5a98b251d1c.tar.gz gcc-725231e16768bd9f16169b3b7e4cb5a98b251d1c.tar.bz2 |
diagnostics: isolate SARIF output's pretty_printer [PR116613]
Add an m_printer to sarif_builder and use throughout, rather than
using the context's printer. For now this is the same printer, but
eventually this should help with transitioning to multiple output sinks.
No functional change intended.
gcc/ChangeLog:
PR other/116613
* diagnostic-format-sarif.cc (sarif_builder::m_printer): New
field.
(sarif_invocation::add_notification_for_ice): Drop context param.
(sarif_invocation::prepare_to_flush): Convert param from context
to builder.
(sarif_result::on_nested_diagnostic): Drop context param. Use
builder's printer.
(sarif_result::on_diagram): Drop context param.
(sarif_ice_notification::sarif_ice_notification): Drop context
param. Use builder's printer.
(sarif_builder::sarif_builder): Initialize m_printer.
(sarif_builder::on_report_diagnostic): Drop context param. Use
builder's printer.
(sarif_builder::emit_diagram): Drop context param.
(sarif_builder::flush_to_object): Use this rather than context
for call to prepare_to_flush.
(sarif_builder::make_result_object): Drop context param. Use
builder's printer.
(sarif_builder::make_reporting_descriptor_object_for_warning):
Drop context param.
(sarif_builder::make_message_object_for_diagram): Likewise.
Use builder's printer.
(sarif_output_format::on_report_diagnostic): Drop context param
from call to sarif_builder::on_report_diagnostic.
(sarif_output_format::on_diagram): Drop context param from call to
sarif_builder::emit_diagram.
* diagnostic.h (diagnostic_conetxt::get_client_data_hooks): Make const.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/program-state.cc')
0 files changed, 0 insertions, 0 deletions