From 500557c4e9ae9bb527384bb0eed71e50ee76d27f Mon Sep 17 00:00:00 2001 From: Matt Godbolt Date: Thu, 21 Dec 2017 07:07:41 -0600 Subject: [PATCH] Prevent colourisation of AST dump in clang. Fixes #696 --- lib/base-compiler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/base-compiler.js b/lib/base-compiler.js index 4981934c9..14425c735 100644 --- a/lib/base-compiler.js +++ b/lib/base-compiler.js @@ -165,7 +165,8 @@ Compile.prototype.prepareArguments = function (userOptions, filters, backendOpti Compile.prototype.generateAST = function (inputFilename, options) { // These options make Clang produce an AST dump - let newOptions = options.concat(["-Xclang", "-ast-dump", "-fsyntax-only"]); + let newOptions = _.filter(options, option => option !== '-fcolor-diagnostics') + .concat(["-Xclang", "-ast-dump", "-fsyntax-only"]); let execOptions = this.getDefaultExecOptions(); // A higher max output is needed for when the user includes headers