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
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'};
if (!($Arg =~ /^-/)) {
push @Files,$Arg; next;
}
+
+ exit 0;
}
if ($Action eq 'compile' or $Action eq 'link') {
$ENV{'LDPLUSPLUS'} = $LDPLUSPLUS;
}
- return system(@$Args);
+ return (system(@$Args) >> 8);
}
##----------------------------------------------------------------------------##