diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-25 20:10:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-25 20:10:45 +0000 |
commit | a3b3c86a47059f31abb5c58ce37aa58a9b347101 (patch) | |
tree | 42f5008e30d012b212273d3af86d98a9d889b05c | |
parent | 8d57244601ed878f524de2275ff683f4594ba57a (diff) | |
download | bcm5719-llvm-a3b3c86a47059f31abb5c58ce37aa58a9b347101.tar.gz bcm5719-llvm-a3b3c86a47059f31abb5c58ce37aa58a9b347101.zip |
ccc-analyzer now correctly reports the exit code from 'cc'.
scan-build now correctly reports the exit code from the build command.
Fixes: <rdar://problem/6172224>
llvm-svn: 55324
-rwxr-xr-x | clang/utils/ccc-analyzer | 4 | ||||
-rwxr-xr-x | clang/utils/scan-build | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/utils/ccc-analyzer b/clang/utils/ccc-analyzer index c760a864fdd..07205e7ae55 100755 --- a/clang/utils/ccc-analyzer +++ b/clang/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/clang/utils/scan-build b/clang/utils/scan-build index d04c2897e9d..90824ab9677 100755 --- a/clang/utils/scan-build +++ b/clang/utils/scan-build @@ -680,7 +680,7 @@ sub RunBuildCommand { $ENV{'LDPLUSPLUS'} = $LDPLUSPLUS; } - return system(@$Args); + return (system(@$Args) >> 8); } ##----------------------------------------------------------------------------## |