[PATCH] D65212: [analyzer] Fix exporting SARIF files from scan-build on Windows

Joe Ranieri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 12:03:51 PDT 2019


jranieri-grammatech updated this revision to Diff 211578.
jranieri-grammatech added a comment.

Update an additional place that used -z.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65212/new/

https://reviews.llvm.org/D65212

Files:
  clang/tools/scan-build/libexec/ccc-analyzer


Index: clang/tools/scan-build/libexec/ccc-analyzer
===================================================================
--- clang/tools/scan-build/libexec/ccc-analyzer
+++ clang/tools/scan-build/libexec/ccc-analyzer
@@ -118,7 +118,7 @@
 
 # Remove any stale files at exit.
 END {
-  if (defined $ResultFile && -z $ResultFile) {
+  if (defined $ResultFile && $ResultFile ne "") {
     unlink($ResultFile);
   }
   if (defined $CleanupFile) {
@@ -752,7 +752,7 @@
                                DIR => $HtmlDir);
         $ResultFile = $f;
         # If the HtmlDir is not set, we should clean up the plist files.
-        if (!defined $HtmlDir || -z $HtmlDir) {
+        if (!defined $HtmlDir || $HtmlDir eq "") {
           $CleanupFile = $f;
         }
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65212.211578.patch
Type: text/x-patch
Size: 762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190724/7d58853f/attachment.bin>


More information about the cfe-commits mailing list