diff --git a/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index 120a63e7a240aa75cfea5e93095cb9350bc95c65..e32b85b9b3fb40e4f395152e12c5c1df16885d83 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;