summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-05 15:05:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-05 15:05:40 +0000
commit38d7c34f75eed2089802e209fb29bc2dfbf1b7a7 (patch)
treea3037644395e4c1ccac0f5bb68c7cb09df0ec0d5 /lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
parentabab18373808f2a179a97b00d574e306970934d7 (diff)
downloadclang-38d7c34f75eed2089802e209fb29bc2dfbf1b7a7.tar.gz
clang-38d7c34f75eed2089802e209fb29bc2dfbf1b7a7.tar.bz2
clang-38d7c34f75eed2089802e209fb29bc2dfbf1b7a7.tar.xz
Fix PR16547.
We should not be asking unique_file to prepend the system temporary directory when creating the html report. Unfortunately I don't think we can test this with the current infrastructure since unique_file ignores MakeAbsolute if the directory is already absolute and the paths provided by lit are. I will take a quick look at making this api a bit less error prone. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
index 120a63e7a2..e32b85b9b3 100644
--- a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
+++ b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
@@ -247,8 +247,9 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
SmallString<128> Model, ResultPath;
llvm::sys::path::append(Model, Directory, "report-%%%%%%.html");
- if (llvm::error_code EC =
- llvm::sys::fs::unique_file(Model.str(), FD, ResultPath)) {
+ if (llvm::error_code EC = llvm::sys::fs::unique_file(
+ Model.str(), FD, ResultPath, false,
+ llvm::sys::fs::all_read | llvm::sys::fs::all_write)) {
llvm::errs() << "warning: could not create file in '" << Directory
<< "': " << EC.message() << '\n';
return;