How do I get clang to dump the AST without color?
问题 Using clang-check to dump a source code's AST, can be done with the following command: $ clang-check -ast-dump file.c -- However, the output of this command will appear colorful within the terminal. When I direct the output to a file, I'm stuck with all of the color escape codes: $ clang-check -ast-dump file.c -- > out.txt example: [0;1;32mTranslationUnitDecl[0m[0;33m 0x227c5c0[0m <[0;33m<invalid sloc>[0m> [0;33m<invalid sloc>[0m [0;34m|-[0m[0;1;32mTypedefDecl[0m[0;33m 0x227cac0[0m <[0;33m