Have 'Analyzer Failures' files be named to reflect the category of problem.

llvm-svn: 63080
This commit is contained in:
Ted Kremenek 2009-01-27 01:19:08 +00:00
parent 52e907a780
commit 725fb43012
1 changed files with 9 additions and 4 deletions

View File

@ -41,13 +41,18 @@ 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",
my ($PPH, $PPFile) = tempfile( $prefix . "_XXXXXX",
SUFFIX => GetPPExt($Lang),
DIR => $Dir);
@ -171,7 +176,7 @@ sub Analyze {
}
elsif ($Result) {
ProcessClangFailure($Clang, $Lang, $file, \@CmdArgsSansAnalyses, $HtmlDir,
"Parser Rejects", $ofile);
$ParserRejects, $ofile);
}
`rm -f $ofile`;