]> granicus.if.org Git - clang/commitdiff
ccc-analyzer now correctly reports the exit code from 'cc'.
authorTed Kremenek <kremenek@apple.com>
Mon, 25 Aug 2008 20:10:45 +0000 (20:10 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 25 Aug 2008 20:10:45 +0000 (20:10 +0000)
scan-build now correctly reports the exit code from the build command.
Fixes: <rdar://problem/6172224>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55324 91177308-0d34-0410-b5e6-96231b3b80d8

utils/ccc-analyzer
utils/scan-build

index c760a864fdd1a87e27e312fe501737bff7bb942c..07205e7ae559c4b92cf45535c2c13fa0b9ce9da6 100755 (executable)
@@ -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') {
index d04c2897e9df135104ec17681a969598c6b2c35b..90824ab96771754858efae671a320a0ac82777f0 100755 (executable)
@@ -680,7 +680,7 @@ sub RunBuildCommand {
     $ENV{'LDPLUSPLUS'} = $LDPLUSPLUS;    
   }
   
-  return system(@$Args);
+  return (system(@$Args) >> 8);
 }
 
 ##----------------------------------------------------------------------------##