gcc/libcc1
David Malcolm 8fc4e6c397 diagnostics: use const and references for diagnostic_info
No functional change intended.

gcc/c-family/ChangeLog:
	* c-opts.cc (c_diagnostic_finalizer): Make "diagnostic" param
	const.

gcc/cp/ChangeLog:
	* cp-tree.h (cxx_print_error_function): Make diagnostic_info param
	const.
	* error.cc (cxx_print_error_function): Likewise.
	(cp_diagnostic_starter): Likewise.
	(cp_print_error_function): Likewise.

gcc/ChangeLog:
	* diagnostic-format-json.cc (on_begin_diagnostic): Convert param
	to const reference.
	(on_end_diagnostic): Likewise.
	(json_output_format::on_end_diagnostic): Likewise.
	* diagnostic-format-sarif.cc
	(sarif_invocation::add_notification_for_ice): Likewise.
	(sarif_result::on_nested_diagnostic): Likewise.
	(sarif_ice_notification::sarif_ice_notification): Likewise.
	(sarif_builder::end_diagnostic): Likewise.
	(sarif_builder::make_result_object): Likewise.
	(make_reporting_descriptor_object_for_warning): Likewise.
	(sarif_builder::make_locations_arr): Likewise.
	(sarif_output_format::on_begin_diagnostic): Likewise.
	(sarif_output_format::on_end_diagnostic): Likewise.
	* diagnostic.cc (default_diagnostic_starter): Make diagnostic_info
	param const.
	(default_diagnostic_finalizer): Likewise.
	(diagnostic_context::report_diagnostic): Pass diagnostic by
	reference to on_{begin,end}_diagnostic.
	(diagnostic_text_output_format::on_begin_diagnostic): Convert
	param to const reference.
	(diagnostic_text_output_format::on_end_diagnostic): Likewise.
	* diagnostic.h (diagnostic_starter_fn): Make diagnostic_info param
	const.
	(diagnostic_finalizer_fn): Likeewise.
	(diagnostic_output_format::on_begin_diagnostic): Convert param to
	const reference.
	(diagnostic_output_format::on_end_diagnostic): Likewise.
	(diagnostic_text_output_format::on_begin_diagnostic): Likewise.
	(diagnostic_text_output_format::on_end_diagnostic): Likewise.
	(default_diagnostic_starter): Make diagnostic_info param const.
	(default_diagnostic_finalizer): Likewise.
	* langhooks-def.h (lhd_print_error_function): Make diagnostic_info
	param const.
	* langhooks.cc (lhd_print_error_function): Likewise.
	* langhooks.h (lang_hooks::print_error_function): Likewise.
	* tree-diagnostic.cc (diagnostic_report_current_function):
	Likewise.
	(default_tree_diagnostic_starter): Likewise.
	(virt_loc_aware_diagnostic_finalizer): Likewise.
	* tree-diagnostic.h (diagnostic_report_current_function):
	Likewise.
	(virt_loc_aware_diagnostic_finalizer): Likewise.

gcc/fortran/ChangeLog:
	* error.cc (gfc_diagnostic_starter): Make diagnostic_info param
	const.
	(gfc_diagnostic_finalizer): Likewise.

gcc/jit/ChangeLog:
	* dummy-frontend.cc (jit_begin_diagnostic): Make diagnostic_info
	param const.
	(jit_end_diagnostic): Likewise.  Pass to add_diagnostic by
	reference.
	* jit-playback.cc (jit::playback::context::add_diagnostic):
	Convert diagnostic_info to const reference.
	* jit-playback.h (jit::playback::context::add_diagnostic):
	Likewise.

gcc/testsuite/ChangeLog:
	* g++.dg/plugin/show_template_tree_color_plugin.c
	(noop_starter_fn): Make diagnostic_info param const.
	* gcc.dg/plugin/diagnostic_group_plugin.c
	(test_diagnostic_starter): Likewise.
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
	(custom_diagnostic_finalizer): Likewise.
	* gcc.dg/plugin/location_overflow_plugin.c
	(verify_unpacked_ranges): Likewise.
	(verify_no_columns): Likewise.

libcc1/ChangeLog:
	* context.cc (plugin_print_error_function): Make diagnostic_info
	param const.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2023-12-06 12:35:08 -05:00
..
aclocal.m4
callbacks.cc
callbacks.hh
cc1plugin-config.h.in
ChangeLog Daily bump. 2023-11-17 00:17:33 +00:00
compiler-name.hh
compiler.cc
compiler.hh
configure Config,Darwin: Allow for configuring Darwin to use embedded runpath. 2023-10-22 19:30:02 +01:00
configure.ac
connection.cc
connection.hh
context.cc diagnostics: use const and references for diagnostic_info 2023-12-06 12:35:08 -05:00
context.hh
deleter.hh
findcomp.cc
findcomp.hh
gdbctx.hh
libcc1.cc
libcc1.sym
libcc1plugin.cc Fix crash in libcc1 2023-11-15 21:45:34 -07:00
libcc1plugin.sym
libcp1.cc
libcp1plugin.cc
libcp1plugin.sym
Makefile.am
Makefile.in
marshall-cp.hh
marshall.cc
marshall.hh
names.cc
names.hh
rpc.hh
status.hh