forked from OSchip/llvm-project
createUniqueFile() is documented to create the file in the temporary directory unless it's supplied an absolute path.
Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute. Summary: Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute. Reviewers: rsmith, akyrtzi Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12774 llvm-svn: 248977
This commit is contained in:
parent
c50ae36509
commit
3c55f2cd96
|
@ -281,7 +281,12 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
|
|||
|
||||
if (!AnalyzerOpts.shouldWriteStableReportFilename()) {
|
||||
llvm::sys::path::append(Model, Directory, "report-%%%%%%.html");
|
||||
|
||||
if (std::error_code EC =
|
||||
llvm::sys::fs::make_absolute(Model)) {
|
||||
llvm::errs() << "warning: could not make '" << Model
|
||||
<< "' absolute: " << EC.message() << '\n';
|
||||
return;
|
||||
}
|
||||
if (std::error_code EC =
|
||||
llvm::sys::fs::createUniqueFile(Model, FD, ResultPath)) {
|
||||
llvm::errs() << "warning: could not create file in '" << Directory
|
||||
|
|
Loading…
Reference in New Issue