Make sure the output filepath supplied to createUniqueFile() in HTMLDiagnostics::ReportDiag() is absolute.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Could you handle the error code coming out of make_absolute? It looks like it calls current_path(), which can fail in interesting ways.
Comment Actions
Are you suggesting I change the code to something like the following:
if (std::error_code EC =
llvm::sys::fs::make_absolute(Model)) {
llvm::errs() << "warning: could not make '" << Model
<< "' absolute: " << EC.message() << '\n';
return;
}Comment Actions
- Update patch with feedback from vsk: better handle errors from make_absolute().
Updating D12774: 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.