diff --git a/clang/utils/scan-build b/clang/utils/scan-build index acdc4ce9cdc8..873f1a1a09b0 100755 --- a/clang/utils/scan-build +++ b/clang/utils/scan-build @@ -383,32 +383,25 @@ sub ScanFile { my $BugCategory; my $BugPathLength = 1; my $BugLine = 0; - my $found = 0; while () { - - last if ($found == 5); + last if (//); if (/$/) { $BugType = $1; - ++$found; } elsif (/$/) { $BugFile = abs_path($1); UpdatePrefix($BugFile); - ++$found; } elsif (/$/) { $BugPathLength = $1; - ++$found; } elsif (/$/) { $BugLine = $1; - ++$found; } elsif (/$/) { $BugCategory = $1; - ++$found; } }