r185707 - Fix PR16547.
Rafael Espindola
rafael.espindola at gmail.com
Fri Jul 5 08:05:40 PDT 2013
Author: rafael
Date: Fri Jul 5 10:05:40 2013
New Revision: 185707
URL: http://llvm.org/viewvc/llvm-project?rev=185707&view=rev
Log:
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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp?rev=185707&r1=185706&r2=185707&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp Fri Jul 5 10:05:40 2013
@@ -247,8 +247,9 @@ void HTMLDiagnostics::ReportDiag(const P
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;
More information about the cfe-commits
mailing list