gcc/libcpp
David Malcolm 9c4a4b3cbd Add range_idx param to range_label::get_text
This patch updates the pure virtual function range_label::get_text
(and its implementations) so that the index of the range is passed
in, allowing for one label instance to be shared by multiple ranges.

gcc/c-family/ChangeLog:
	* c-format.c (range_label_for_format_type_mismatch::get_text):
	Update for new param.

gcc/c/ChangeLog:
	* c-objc-common.c (range_label_for_type_mismatch::get_text):
	Update for new param.
	* c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
	Likewise.

gcc/cp/ChangeLog:
	* error.c (range_label_for_type_mismatch::get_text): Update for
	new param.

gcc/ChangeLog:
	* diagnostic-show-locus.c (class layout_range): Add field
	"m_original_idx".
	(layout_range::layout_range): Add "original_idx" param and use it
	to initialize new field.
	(make_range): Use 0 for original_idx.
	(layout::layout): Pass in index to calls to
	maybe_add_location_range.
	(layout::maybe_add_location_range): Add param "original_idx" and
	pass it on to layout_range.
	(layout::print_any_labels): Pass on range->m_original_idx to
	get_text call.
	(gcc_rich_location::add_location_if_nearby): Use 0 for
	original_idx.
	* gcc-rich-location.h (text_range_label::get_text): Update for new
	param.
	(range_label_for_type_mismatch::get_text): Likewise.

libcpp/ChangeLog:
	* include/line-map.h (range_label::get_text): Add param
	"range_idx".

From-SVN: r264376
2018-09-17 23:32:12 +00:00
..
include Add range_idx param to range_label::get_text 2018-09-17 23:32:12 +00:00
po
ChangeLog Add range_idx param to range_label::get_text 2018-09-17 23:32:12 +00:00
ChangeLog.jit
Makefile.in [PATCH] Kill cpp-id-data.h 2018-08-20 14:20:04 +00:00
aclocal.m4
charset.c
config.in
configure
configure.ac
directives-only.c
directives.c [CPP PATCH] node type 2018-08-20 16:32:29 +00:00
errors.c
expr.c [PATCH] CPP Macro predicates 2018-08-16 13:51:38 +00:00
files.c [PATCH] CPP Macro predicates 2018-08-16 13:51:38 +00:00
identifiers.c [PATCH] CPP Macro predicates 2018-08-16 13:51:38 +00:00
init.c [CPP PATCH] node type 2018-08-20 16:32:29 +00:00
internal.h [PATCH] Kill cpp-id-data.h 2018-08-20 14:20:04 +00:00
lex.c [PATCH] Macro body is trailing array 2018-08-17 16:07:19 +00:00
line-map.c Less verbose fix-it hints for missing header files (PR 87091) 2018-08-27 14:02:05 +00:00
location-example.txt
macro.c [CPP PATCH] node type 2018-08-20 16:32:29 +00:00
makeucnid.c
mkdeps.c
pch.c [CPP PATCH] node type 2018-08-20 16:32:29 +00:00
symtab.c
system.h
traditional.c [CPP PATCH] node type 2018-08-20 16:32:29 +00:00
ucnid.h
ucnid.tab