<div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 7, 2015 at 5:15 AM, Victor via cfe-users <span dir="ltr"><<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, all.<br>
<br>
Why doesn't clang use colors for diagnostics by default?<br>
My environment:<br>
<br>
$ cat /etc/*-release<br>
Red Hat Enterprise Linux Server release 6.3 (Santiago)<br>
<br>
$ echo $TERM<br>
xterm<br>
<br>
Doc here <a href="http://clang.llvm.org/docs/UsersManual.html#formatting-of-diagnostics" rel="noreferrer" target="_blank">http://clang.llvm.org/docs/UsersManual.html#formatting-of-diagnostics</a> says: "This option, which defaults to on when a color-capable terminal is detected". Isn't xterm "a color-capable terminal"?<br>
<br>
If I give -fcolor-diagnostics explicitly, all works as expected. But why must I do that? GCC uses colors by default.<br>
_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div><br></div>