[LLVMdev] Turning off color in clang error mesages?

Vladimir G. Ivanovic vladimir at acm.org
Tue Mar 2 14:58:47 PST 2010


Is it possible to turn off the colorizing of clang error messages? The
reason I ask is that using clang in an XEmacs buffer results in user
unfriendly output like this:

$ clang -c -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts
-Wpacked -Wshadow -Wmissing-declarations -Wmissing-prototypes
-Wstrict-prototypes -Wdeclaration-after-statement  -Wunused-parameter
-ggdb  -march=native -mtune=native  -Demacs -I.
-I/usr/local/src/xemacs-beta/src -DHAVE_CONFIG_H
-I/usr/include/freetype2 doprnt.c
 [1mdoprnt.c:127:7:  [0m [0;1;35mwarning:  [0m [1mexpression result
unused [-Wunused-value]
 [0m      Lstream_putc (lstr, zero_flag ? '0' : ' ');
 [0;1;32m      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 [0mIn file included from doprnt.c:34:
./lstream.h:332:34: note: instantiated from:
    Lstream_flush_out (stream) : 0))
 [0;1;32m                                 ^
 [0m [1mdoprnt.c:136:7:  [0m [0;1;35mwarning:  [0m [1mexpression result
unused [-Wunused-value]
 [0m      Lstream_putc (lstr, zero_flag ? '0' : ' ');
 [0;1;32m      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 [0mIn file included from doprnt.c:34:
./lstream.h:332:34: note: instantiated from:
    Lstream_flush_out (stream) : 0))
 [0;1;32m                                 ^
 [0m2 diagnostics generated.

If the answer is "no", then perhaps someone could point me to the place
in the code that writes out error messages, and I'll try and hack XEmacs
support in.

Thanks.

--- Vladimir

 -- 
Vladimir G. Ivanovic                            http://www.leonora.org
+1 650 450 4101                                       vladimir at acm.org




More information about the llvm-dev mailing list