summaryrefslogtreecommitdiffstats
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
commite4ffbdf349396b930419d2bf816a19ec75513a8f (patch)
tree9e1ce744555d2e55b6485d94f66d99626bf8140d
parentc2e3ba9eedc4cbe47f76d01bf067d987e6d58904 (diff)
downloadbcm5719-llvm-e4ffbdf349396b930419d2bf816a19ec75513a8f.tar.gz
bcm5719-llvm-e4ffbdf349396b930419d2bf816a19ec75513a8f.zip
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. llvm-svn: 185707
-rw-r--r--clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
index 120a63e7a24..e32b85b9b3f 100644
--- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud