[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 07:18:52 PDT 2019
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;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65212.211498.patch
Type: text/x-patch
Size: 537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190724/0ed3843f/attachment.bin>
More information about the cfe-commits
mailing list