diagnostics: tweak to line-insertion fix-it hints with line-numbering
This commit slightly tweaks line-insertion fix-it hints, so that
with line-numbering, rather than e.g.:
99 | x = a;
|+ break;
110 | case 'b':
| ^~~~~~~~
we fill the margin with "+":
99 | x = a;
+++ |+ break;
110 | case 'b':
| ^~~~~~~~
to emphasize that this is a suggested new line, rather than the user's
source.
gcc/ChangeLog:
* diagnostic-show-locus.c (layout::start_annotation_line): Add
"margin_char" parameter, defaulting to space. Use it in place
of pp_space for the initial part of the margin.
(layout::print_leading_fixits): Use '+' when filling the margin
of line-insertion fix-it hints.
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c
(test_fixit_insert_newline): Update expected output to show '+'
characters in margin of line-insertion fix-it hint.
From-SVN: r263605