From: Ted Kremenek Date: Mon, 25 Aug 2008 20:10:45 +0000 (+0000) Subject: ccc-analyzer now correctly reports the exit code from 'cc'. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a4ddaf39a26f9c7e30d3aeca17c702213a29d9f;p=clang ccc-analyzer now correctly reports the exit code from 'cc'. scan-build now correctly reports the exit code from the build command. Fixes: git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55324 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer index c760a864fd..07205e7ae5 100755 --- a/utils/ccc-analyzer +++ b/utils/ccc-analyzer @@ -187,7 +187,7 @@ my $Output; my $CC = $ENV{'CCC_CC'}; if (!defined $CC) { $CC = "gcc"; } my $Status = system($CC,@ARGV); -if ($Status) { exit($Status); } +if ($Status) { exit($Status >> 8); } # Get the analysis options. my $Analyses = $ENV{'CCC_ANALYZER_ANALYSIS'}; @@ -323,6 +323,8 @@ foreach (my $i = 0; $i < scalar(@ARGV); ++$i) { if (!($Arg =~ /^-/)) { push @Files,$Arg; next; } + + exit 0; } if ($Action eq 'compile' or $Action eq 'link') { diff --git a/utils/scan-build b/utils/scan-build index d04c2897e9..90824ab967 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -680,7 +680,7 @@ sub RunBuildCommand { $ENV{'LDPLUSPLUS'} = $LDPLUSPLUS; } - return system(@$Args); + return (system(@$Args) >> 8); } ##----------------------------------------------------------------------------##