r185707 - Fix PR16547.

Benjamin Kramer benny.kra at gmail.com
Fri Jul 5 08:55:41 PDT 2013


On Fri, Jul 5, 2013 at 5:05 PM, Rafael Espindola <rafael.espindola at gmail.com
> 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
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130705/775b74a7/attachment.html>


More information about the cfe-commits mailing list