[cfe-commits] r63080 - /cfe/trunk/utils/ccc-analyzer
Ted Kremenek
kremenek at apple.com
Mon Jan 26 17:19:08 PST 2009
Author: kremenek
Date: Mon Jan 26 19:19:08 2009
New Revision: 63080
URL: http://llvm.org/viewvc/llvm-project?rev=63080&view=rev
Log:
Have 'Analyzer Failures' files be named to reflect the category of problem.
Modified:
cfe/trunk/utils/ccc-analyzer
Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=63080&r1=63079&r2=63080&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Mon Jan 26 19:19:08 2009
@@ -41,15 +41,20 @@
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 @@
}
elsif ($Result) {
ProcessClangFailure($Clang, $Lang, $file, \@CmdArgsSansAnalyses, $HtmlDir,
- "Parser Rejects", $ofile);
+ $ParserRejects, $ofile);
}
`rm -f $ofile`;
More information about the cfe-commits
mailing list