diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-09-30 11:48:30 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-09-30 11:48:30 -0400 |
commit | e7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7 (patch) | |
tree | 57804a7bfba3023b89bbce8ce1cb42a7b973b014 /gcc/cp/parser.cc | |
parent | be02253af810348be689cfa6f235af96c8cc5802 (diff) | |
download | gcc-e7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7.zip gcc-e7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7.tar.gz gcc-e7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7.tar.bz2 |
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 <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions