[cfe-commits] r58491 - /cfe/trunk/utils/scan-build
Ted Kremenek
kremenek at apple.com
Thu Oct 30 22:48:44 PDT 2008
Author: kremenek
Date: Fri Oct 31 00:48:42 2008
New Revision: 58491
URL: http://llvm.org/viewvc/llvm-project?rev=58491&view=rev
Log:
On Mac OS X, use TMPDIR as the default location to place analysis results. This is a more secure location for such files, and addresses <rdar://problem/6334220>.
Modified:
cfe/trunk/utils/scan-build
Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=58491&r1=58490&r2=58491&view=diff
==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Fri Oct 31 00:48:42 2008
@@ -137,7 +137,14 @@
my $TmpMode = 0;
if (!defined $Dir) {
- $Dir = "/tmp";
+ if (`uname` =~ /Darwin/) {
+ $Dir = $ENV{'TMPDIR'};
+ if (!defined $Dir) { $Dir = "/tmp"; }
+ }
+ else {
+ $Dir = "/tmp";
+ }
+
$TmpMode = 1;
}
@@ -848,7 +855,7 @@
-o - Target directory for HTML report files. Subdirectories
will be created as needed to represent separate "runs" of
the analyzer. If this option is not specified, a directory
- is created in /tmp to store the reports.
+ is created in /tmp (TMPDIR on Mac OS X) to store the reports.
-h - Display this message.
--help
More information about the cfe-commits
mailing list