+2018-08-16 David Malcolm <dmalcolm@redhat.com>
+
+ * 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.
+
2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (two unnamed define_insn and define_split):
void print_source_line (linenum_type row, const char *line, int line_width,
line_bounds *lbounds_out);
bool should_print_annotation_line_p (linenum_type row) const;
- void start_annotation_line () const;
+ void start_annotation_line (char margin_char = ' ') const;
void print_annotation_line (linenum_type row, const line_bounds lbounds);
void print_any_labels (linenum_type row);
void print_trailing_fixits (linenum_type row);
margin, which is empty for annotation lines. Otherwise, do nothing. */
void
-layout::start_annotation_line () const
+layout::start_annotation_line (char margin_char) const
{
if (m_show_line_numbers_p)
{
for (int i = 0; i < m_linenum_width; i++)
- pp_space (m_pp);
+ pp_character (m_pp, margin_char);
pp_string (m_pp, " |");
}
}
helps them stand out from each other, and from
the surrounding text. */
m_colorizer.set_normal_text ();
- start_annotation_line ();
+ start_annotation_line ('+');
pp_character (m_pp, '+');
m_colorizer.set_fixit_insert ();
/* Print all but the trailing newline of the fix-it hint.
+2018-08-16 David Malcolm <dmalcolm@redhat.com>
+
+ * 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.
+
2018-08-16 Nathan Sidwell <nathan@acm.org>
* gcc.dg/cpp/macsyntx.c: Adjust expected errors.