]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: use unicode art for interprocedural depth
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 16 May 2024 01:22:52 +0000 (21:22 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 16 May 2024 01:22:52 +0000 (21:22 -0400)
commite656656e711949ef42a7e284f7cf81ca56f37374
treebcc138e837762b30b4a16044422de692fb14d058
parent0b7ebe5427a4af0956e0aed5e7432b98559ca7b5
diagnostics: use unicode art for interprocedural depth

gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/out-of-bounds-diagram-1-emoji.c: Update expected
output to use unicode for depth indication.
* gcc.dg/analyzer/out-of-bounds-diagram-1-unicode.c: Likewise.

gcc/ChangeLog:
* text-art/theme.cc (ascii_theme::get_cppchar): Add
cell_kind::INTERPROCEDURAL_*.
(unicode_theme::get_cppchar): Likewise.
* text-art/theme.h (theme::cell_kind): Likewise.
* tree-diagnostic-path.cc:
(thread_event_printer::print_swimlane_for_event_range): Use the
above to get characters for indicating interprocedural stack
depth activity, falling back to ascii.
(selftest::test_interprocedural_path_1): Test with both ascii
and unicode themes.
(selftest::test_interprocedural_path_2): Likewise.
(selftest::test_recursion): Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/testsuite/gcc.dg/analyzer/out-of-bounds-diagram-1-emoji.c
gcc/testsuite/gcc.dg/analyzer/out-of-bounds-diagram-1-unicode.c
gcc/text-art/theme.cc
gcc/text-art/theme.h
gcc/tree-diagnostic-path.cc