https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116613

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>:

https://gcc.gnu.org/g:725231e16768bd9f16169b3b7e4cb5a98b251d1c

commit r15-3750-g725231e16768bd9f16169b3b7e4cb5a98b251d1c
Author: David Malcolm <dmalc...@redhat.com>
Date:   Fri Sep 20 18:51:55 2024 -0400

    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 <dmalc...@redhat.com>

Reply via email to