]> granicus.if.org Git - clang/commitdiff
[analyzer] Fix scan-build's plist output in plist-html mode.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 8 Aug 2019 20:22:32 +0000 (20:22 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 8 Aug 2019 20:22:32 +0000 (20:22 +0000)
r366941 accidentally made it delete all plist files
as soon as they're produced.

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

tools/scan-build/libexec/ccc-analyzer

index 277ed9f83af72f4b9bbce516ecc2489a26b19212..e1635e6c29b87dd80cfb0875622c7f9aa9ef9c3d 100755 (executable)
@@ -118,7 +118,7 @@ my $ResultFile;
 
 # Remove any stale files at exit.
 END {
-  if (defined $ResultFile && $ResultFile ne "") {
+  if (defined $ResultFile && -z $ResultFile) {
     unlink($ResultFile);
   }
   if (defined $CleanupFile) {