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 $BugPathLength = 1;
my $BugLine = 0;
my $found = 0;
while (<IN>) {
last if ($found == 5);
last if (/<!-- BUGMETAEND -->/);
if (/<!-- BUGTYPE (.*) -->$/) {
$BugType = $1;
++$found;
}
elsif (/<!-- BUGFILE (.*) -->$/) {
$BugFile = abs_path($1);
UpdatePrefix($BugFile);
++$found;
}
elsif (/<!-- BUGPATHLENGTH (.*) -->$/) {
$BugPathLength = $1;
++$found;
}
elsif (/<!-- BUGLINE (.*) -->$/) {
$BugLine = $1;
++$found;
}
elsif (/<!-- BUGCATEGORY (.*) -->$/) {
$BugCategory = $1;
++$found;
}
}