On Fri, Jul 5, 2013 at 5:05 PM, Rafael Espindola <[email protected] > wrote:
> 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. > Thanks for the fix. This can be tested with a little bit of shell trickery, added a test case in r185708. - Ben > > 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; > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
