Now that the -cc1 options for analyzer checks have a structured naming, add back scanning for analyzer checks to scan-build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2010-02-05 02:18:39 +00:00
Родитель 565e465c6d
Коммит 9f9e0dbc13
1 изменённых файлов: 4 добавлений и 15 удалений

Просмотреть файл

@ -98,25 +98,14 @@ if (!defined $Clang || ! -x $Clang) {
my %AvailableAnalyses;
# Query clang for analysis options.
open(PIPE, "-|", $Clang, "-cc1", "--help") or
open(PIPE, "-|", $Clang, "-cc1", "-help") or
DieDiag("Cannot execute '$Clang'\n");
my $FoundAnalysis = 0;
while(<PIPE>) {
if ($FoundAnalysis == 0) {
if (/Checks and Analyses/) {
$FoundAnalysis = 1;
}
next;
}
if (/^\s\s\s\s([^\s]+)\s(.+)$/) {
next if ($1 =~ /-dump/ or $1 =~ /-view/
or $1 =~ /-warn-uninit/);
$AvailableAnalyses{$1} = $2;
if (/(-analyzer-check-[^\s]+)/) {
$AvailableAnalyses{$1} = 1;
next;
}
last;
}
close (PIPE);
@ -951,7 +940,7 @@ ENDTEXT
print " ";
}
print " $Analysis $AvailableAnalyses{$Analysis}\n";
print " $Analysis\n";
}
print <<ENDTEXT