Have scan-build clue off of 'BUGMETAEND' to know when to stop processing an HTML file.

llvm-svn: 78022
This commit is contained in:
Ted Kremenek 2009-08-03 23:45:27 +00:00
parent 3724cdef3f
commit 90e2e07bd5
1 changed files with 1 additions and 8 deletions

View File

@ -383,32 +383,25 @@ sub ScanFile {
my $BugCategory; my $BugCategory;
my $BugPathLength = 1; my $BugPathLength = 1;
my $BugLine = 0; my $BugLine = 0;
my $found = 0;
while (<IN>) { while (<IN>) {
last if (/<!-- BUGMETAEND -->/);
last if ($found == 5);
if (/<!-- BUGTYPE (.*) -->$/) { if (/<!-- BUGTYPE (.*) -->$/) {
$BugType = $1; $BugType = $1;
++$found;
} }
elsif (/<!-- BUGFILE (.*) -->$/) { elsif (/<!-- BUGFILE (.*) -->$/) {
$BugFile = abs_path($1); $BugFile = abs_path($1);
UpdatePrefix($BugFile); UpdatePrefix($BugFile);
++$found;
} }
elsif (/<!-- BUGPATHLENGTH (.*) -->$/) { elsif (/<!-- BUGPATHLENGTH (.*) -->$/) {
$BugPathLength = $1; $BugPathLength = $1;
++$found;
} }
elsif (/<!-- BUGLINE (.*) -->$/) { elsif (/<!-- BUGLINE (.*) -->$/) {
$BugLine = $1; $BugLine = $1;
++$found;
} }
elsif (/<!-- BUGCATEGORY (.*) -->$/) { elsif (/<!-- BUGCATEGORY (.*) -->$/) {
$BugCategory = $1; $BugCategory = $1;
++$found;
} }
} }