]> granicus.if.org Git - clang/commitdiff
If -fcolor-diagnostics is explicitly passed to the driver respect that even if the...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 23 Sep 2010 12:56:06 +0000 (12:56 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 23 Sep 2010 12:56:06 +0000 (12:56 +0000)
stderr can't handle them. (see http://llvm.org/PR8150)
Patch by Frits van Bommel!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114638 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index bfb42d81ecd204d9f409e94ab1a421cc489a8cab..16339c4bd12384487656f724077862bdeedeb8c9 100644 (file)
@@ -1414,8 +1414,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   // Color diagnostics are the default, unless the terminal doesn't support
   // them.
   if (Args.hasFlag(options::OPT_fcolor_diagnostics,
-                   options::OPT_fno_color_diagnostics) &&
-      llvm::sys::Process::StandardErrHasColors())
+                   options::OPT_fno_color_diagnostics,
+                   llvm::sys::Process::StandardErrHasColors()))
     CmdArgs.push_back("-fcolor-diagnostics");
 
   if (!Args.hasFlag(options::OPT_fshow_source_location,