aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-27 01:19:08 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-27 01:19:08 +0000
commit5daa3be1bf9db399aa7510bbcf2bfc8c7701b6da (patch)
tree0049b6f3ab906e818bc39a73badf4f7fa4afbf2c
parent277faca30c9f8f72b79f55695cbe3395ec246e7c (diff)
Have 'Analyzer Failures' files be named to reflect the category of problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63080 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/ccc-analyzer13
1 files changed, 9 insertions, 4 deletions
diff --git a/utils/ccc-analyzer b/utils/ccc-analyzer
index 6c5e700ae4..a3b7851247 100755
--- a/utils/ccc-analyzer
+++ b/utils/ccc-analyzer
@@ -41,15 +41,20 @@ sub GetPPExt {
return ".i";
}
+my $ParserRejects = "Parser Rejects";
+
sub ProcessClangFailure {
my ($Clang, $Lang, $file, $Args, $HtmlDir, $ErrorType, $ofile) = @_;
my $Dir = "$HtmlDir/crashes";
mkpath $Dir;
+
+ my $prefix = "clang_crash";
+ if ($ErrorType == $ParserRejects) { $prefix = "clang_parser_rejects"; }
# Generate the preprocessed file with cc (i.e., gcc).
- my ($PPH, $PPFile) = tempfile("clang_crash_XXXXXX",
- SUFFIX => GetPPExt($Lang),
- DIR => $Dir);
+ my ($PPH, $PPFile) = tempfile( $prefix . "_XXXXXX",
+ SUFFIX => GetPPExt($Lang),
+ DIR => $Dir);
system $CC, @$Args, "-E", "-o", $PPFile;
close ($PPH);
@@ -171,7 +176,7 @@ sub Analyze {
}
elsif ($Result) {
ProcessClangFailure($Clang, $Lang, $file, \@CmdArgsSansAnalyses, $HtmlDir,
- "Parser Rejects", $ofile);
+ $ParserRejects, $ofile);
}
`rm -f $ofile`;