aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-09-30 11:48:30 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2024-09-30 11:48:30 -0400
commite7a8fbe2fed83b5ce6e2bdb6fd66d9bf47f74db7 (patch)
tree57804a7bfba3023b89bbce8ce1cb42a7b973b014 /gcc/cp/parser.cc
parentbe02253af810348be689cfa6f235af96c8cc5802 (diff)
downloadgcc-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