[all-commits] [llvm/llvm-project] 115eae: [FileCheck] Improve colors in input dumps (#204936)
Joel E. Denny via All-commits
all-commits at lists.llvm.org
Sat Jun 27 16:39:36 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 115eae28058f0d322f1d7d3eab0ab8c13e95e463
https://github.com/llvm/llvm-project/commit/115eae28058f0d322f1d7d3eab0ab8c13e95e463
Author: Joel E. Denny <jdenny.ornl at gmail.com>
Date: 2026-06-27 (Sat, 27 Jun 2026)
Changed paths:
M llvm/include/llvm/Support/WithColor.h
M llvm/include/llvm/Support/raw_ostream.h
A llvm/test/FileCheck/dump-input/color.txt
M llvm/test/FileCheck/opt-color.txt
M llvm/test/lit.cfg.py
M llvm/utils/FileCheck/FileCheck.cpp
Log Message:
-----------
[FileCheck] Improve colors in input dumps (#204936)
This patch makes two improvements to colors used in FileCheck input
dumps:
1. Without this patch, input line numbers and ellipses have a foreground
color of black, which is hard to see in a terminal with a dark color
theme. This patch changes that to bright black (a grayish color), which
looks good to me for all terminal themes I have tried while remaining
distinct from the input text.
2. Without this patch, the input text is accidentally set to bold when
neither `-v` or `-vv` is specified. Perhaps I never noticed because I
tend to always use `-vv`. This patch changes that to use the terminal's
default color.
Case 2 exposes a problem with LLVM's color implementation. Without this
patch, the call to `WithColor`'s constructor actually specifies bold as
`false`, but `WithColor` ignores that when the color is `SAVEDCOLOR`.
While it seems like that should be fixed, I am concerned about the
impact of such a fix on other tools that might have come to
inadvertently depend on the old behavior. For now, this patch adds fixme
comments to the color APIs.
To facilitate testing, this patch adds a lit substitution with a sed
script that translates ANSI escape sequences into plain text format with
symbolic names. It also updates an existing FileCheck test to use it.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list