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

--- Comment #11 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:e7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7

commit r15-3977-ge7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7
Author: David Malcolm <dmalc...@redhat.com>
Date:   Mon Sep 30 11:48:30 2024 -0400

    diagnostics: require callers of diagnostic_show_locus to be explicit about
the printer [PR116613]

    As work towards supporting multiple diagnostic outputs (where each
    output has its own pretty_printer), update diagnostic_show_locus
    so that the pretty_printer must always be explicitly passed in.

    No functional change intended.

    gcc/c-family/ChangeLog:
            PR other/116613
            * c-format.cc (selftest::test_type_mismatch_range_labels):
            Explicitly pass in dc.m_printer to diagnostic_show_locus.

    gcc/ChangeLog:
            PR other/116613
            * diagnostic-show-locus.cc (diagnostic_context::maybe_show_locus):
            Convert param "pp" from * to &.  Drop logic for using the
            context's m_printer when the param is null.
            * diagnostic.h (diagnostic_context::maybe_show_locus): Convert
            param "pp" from * to &.
            (diagnostic_show_locus): Drop default "nullptr" value for pp
            param.  Assert that it and context are nonnull.  Pass pp by
            reference to maybe_show_locus.

    gcc/testsuite/ChangeLog:
            PR other/116613
            * gcc.dg/plugin/expensive_selftests_plugin.c (test_richloc):
            Explicitly pass in dc.m_printer to diagnostic_show_locus.

    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Reply via email to