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 | 0b7ebe5427a4af0956e0aed5e7432b98559ca7b5 (patch) | |
tree | 88d92fc66501f30f607a1a5507e9c6577a8259c3 /gcc/memory-block.cc | |
parent | 3cd267446755ab6b2c59936a718d34c8bc474ca5 (diff) | |
download | gcc-0b7ebe5427a4af0956e0aed5e7432b98559ca7b5.zip gcc-0b7ebe5427a4af0956e0aed5e7432b98559ca7b5.tar.gz gcc-0b7ebe5427a4af0956e0aed5e7432b98559ca7b5.tar.bz2 |
diagnostics: add warning emoji to events with VERB_danger
Tweak the printing of -fdiagnostics-path-format=inline-events so that
any event with diagnostic_event::VERB_danger gains a warning emoji,
provided that the text art theme enables emoji support.
VERB_danger is set by the analyzer on the last event in a path, and so
this emoji appears at the end of all analyzer execution paths
highlighting the location of the problem.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/out-of-bounds-diagram-1-emoji.c: Update expected
output to include warning emoji.
* gcc.dg/analyzer/warning-emoji.c: New test.
gcc/ChangeLog:
* tree-diagnostic-path.cc: Include "text-art/theme.h".
(path_label::get_text): If the event has
diagnostic_event::VERB_danger, and the theme enables emojis, then
add a warning emoji between the event number and the event text.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/memory-block.cc')
0 files changed, 0 insertions, 0 deletions