[cfe-users] Why doesn't clang use colors for diagnostics by default?
Richard Trieu via cfe-users
cfe-users at lists.llvm.org
Wed Sep 9 19:49:21 PDT 2015
Are you invoking Clang with "clang foo.cc" or "clang -cc1 foo.cc"? The
first should detect if you have a color capable terminal and automatically
turn on color diagnostics while the second needs the flag explicitly. The
other possibility is that the Clang you are using was compiled with the
libraries needed to detect a color terminal, and defaults to no color.
On Mon, Sep 7, 2015 at 5:15 AM, Victor via cfe-users <
cfe-users at lists.llvm.org> wrote:
> Hello, all.
> Why doesn't clang use colors for diagnostics by default?
> My environment:
> $ cat /etc/*-release
> Red Hat Enterprise Linux Server release 6.3 (Santiago)
> $ echo $TERM
> Doc here
> says: "This option, which defaults to on when a color-capable terminal is
> detected". Isn't xterm "a color-capable terminal"?
> If I give -fcolor-diagnostics explicitly, all works as expected. But why
> must I do that? GCC uses colors by default.
> cfe-users mailing list
> cfe-users at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-users