diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-05-15 21:22:51 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-05-15 21:22:51 -0400 |
commit | a7be993806a90a58397e9d5bc9b54160ac9f35db (patch) | |
tree | 092dd8b667c8757aac3cd7455a3df02d4e7759ec /gcc/dwarf2codeview.h | |
parent | 38dd4e26e07c6be7cf4d169141ee4f3a03f3a09d (diff) | |
download | gcc-a7be993806a90a58397e9d5bc9b54160ac9f35db.zip gcc-a7be993806a90a58397e9d5bc9b54160ac9f35db.tar.gz gcc-a7be993806a90a58397e9d5bc9b54160ac9f35db.tar.bz2 |
diagnostics: handle SGR codes in line_label::m_display_width
gcc/ChangeLog:
* diagnostic-show-locus.cc: Define INCLUDE_VECTOR and include
"text-art/types.h".
(line_label::line_label): Drop "policy" argument. Use
styled_string::calc_canvas_width when computing m_display_width,
as this skips SGR codes.
(layout::print_any_labels): Update for line_label ctor change.
(selftest::test_one_liner_labels_utf8): Update expected text to
reflect that the labels can fit on one line if we don't get
confused by SGR colorization codes.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/dwarf2codeview.h')
0 files changed, 0 insertions, 0 deletions