Fix Bug 14061 - scan-build crashes during postprocessing if BUGFILE no longer exists
authorSylvestre Ledru <sylvestre@debian.org>
Thu, 17 Jul 2014 08:39:04 +0000 (08:39 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Thu, 17 Jul 2014 08:39:04 +0000 (08:39 +0000)
Experienced with Thunderbird build

Patch by Matti Niemenmaa

llvm-svn: 213235

clang/tools/scan-build/scan-build

index e66b185..585efd5 100755 (executable)
@@ -388,6 +388,10 @@ sub ScanFile {
     }
     elsif (/<!-- BUGFILE (.*) -->$/) {
       $BugFile = abs_path($1);
+      if (!defined $BugFile) {
+         # The file no longer exists: use the original path.
+         $BugFile = $1;
+      }
       UpdatePrefix($BugFile);
     }
     elsif (/<!-- BUGPATHLENGTH (.*) -->$/) {