(scan-build does not set the $HtmlDir when running against configure. Previously, this implied that the plist files would appear in the current directory, with this patch they will get deleted.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139382
91177308-0d34-0410-b5e6-
96231b3b80d8
# Remove any stale files at exit.
END {
- if (defined $CleanupFile && -z $CleanupFile) {
+ if (defined $ResultFile && -z $ResultFile) {
+ `rm -f $ResultFile`;
+ }
+ if (defined $CleanupFile) {
`rm -f $CleanupFile`;
}
}
my ($h, $f) = tempfile("report-XXXXXX", SUFFIX => ".plist",
DIR => $HtmlDir);
$ResultFile = $f;
- $CleanupFile = $f;
+ # If the HtmlDir is not set, we sould clean up the plist files.
+ if (!defined $HtmlDir || -z $HtmlDir) {
+ $CleanupFile = $f;
+ }
}
}