Index: clang/tools/scan-build/libexec/ccc-analyzer =================================================================== --- clang/tools/scan-build/libexec/ccc-analyzer +++ clang/tools/scan-build/libexec/ccc-analyzer @@ -39,11 +39,19 @@ # Invoke 'system', STDOUT and STDERR are output to a temporary file. system $Command, @_; + my $ret = $?; # Restore STDOUT and STDERR. open STDOUT, ">&", \*OLDOUT; open STDERR, ">&", \*OLDERR; + if ($ret != 0) { + print "failed to run $Command \n"; + while(<$TmpFH>){ + print $_; + } + } + return $TmpFH; }