diff options
author | David Malcolm <dmalcolm@redhat.com> | 2018-08-16 22:28:19 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2018-08-16 22:28:19 +0000 |
commit | 5218dafdc219eb49a0b8d776b99fd7a7afb5be0b (patch) | |
tree | 971a758dacf375f998eb1413885623dcb833a42b /gcc/builtins.c | |
parent | 4416420e14b7505355c2318a6bd09ae073551d36 (diff) | |
download | gcc-5218dafdc219eb49a0b8d776b99fd7a7afb5be0b.zip gcc-5218dafdc219eb49a0b8d776b99fd7a7afb5be0b.tar.gz gcc-5218dafdc219eb49a0b8d776b99fd7a7afb5be0b.tar.bz2 |
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
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions