]> granicus.if.org Git - clang/commitdiff
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213235 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-build/scan-build

index e66b185aff883865bfdf76077ced417480e0bc96..585efd516975d3dcbe29a5273206a62144c43501 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 (.*) -->$/) {