From: Sylvestre Ledru Date: Thu, 17 Jul 2014 08:39:04 +0000 (+0000) Subject: Fix Bug 14061 - scan-build crashes during postprocessing if BUGFILE no longer exists X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f29418df13e0d5f0fc09dfd98ad43baae18b3e68;p=clang Fix Bug 14061 - scan-build crashes during postprocessing if BUGFILE no longer exists 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 --- diff --git a/tools/scan-build/scan-build b/tools/scan-build/scan-build index e66b185aff..585efd5169 100755 --- a/tools/scan-build/scan-build +++ b/tools/scan-build/scan-build @@ -388,6 +388,10 @@ sub ScanFile { } elsif (/$/) { $BugFile = abs_path($1); + if (!defined $BugFile) { + # The file no longer exists: use the original path. + $BugFile = $1; + } UpdatePrefix($BugFile); } elsif (/$/) {