jranieri-grammatech created this revision. jranieri-grammatech added reviewers: NoQ, jordan_rose, dcoughlin, george.karpenkov, aaron.ballman. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang.
In Perl, -z is defined as checking if a "file has zero size" and makes no mention what it does when given a directory. It looks like the behavior differs across platforms, which is why on Windows the SARIF file was always being deleted. Repository: rG LLVM Github Monorepo 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 @@ -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; } }
Index: clang/tools/scan-build/libexec/ccc-analyzer =================================================================== --- clang/tools/scan-build/libexec/ccc-analyzer +++ clang/tools/scan-build/libexec/ccc-analyzer @@ -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; } }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits