Only use colored output when the environment variable SCAN_BUILD_COLOR is set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52379 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/scan-build b/utils/scan-build
index d9585f6..e305ee5 100755
--- a/utils/scan-build
+++ b/utils/scan-build
@@ -26,7 +26,8 @@
 my $BuildName;
 my $BuildDate;
 
-my $UseColor = (($ENV{'TERM'} eq 'xterm-color') and -t STDOUT);
+my $UseColor = ((($ENV{'TERM'} eq 'xterm-color') and -t STDOUT)
+                and defined($ENV{'SCAN_BUILD_COLOR'}));
 
 sub Diag {
   if ($UseColor) {