<div dir="ltr">On Fri, Jul 5, 2013 at 5:05 PM, Rafael Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: rafael<br>
Date: Fri Jul  5 10:05:40 2013<br>
New Revision: 185707<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185707&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=185707&view=rev</a><br>
Log:<br>
Fix PR16547.<br>
<br>
We should not be asking unique_file to prepend the system temporary directory<br>
when creating the html report. Unfortunately I don't think we can test this<br>
with the current infrastructure since unique_file ignores MakeAbsolute if the<br>
directory is already absolute and the paths provided by lit are.<br></blockquote><div><br></div><div>Thanks for the fix. This can be tested with a little bit of shell trickery, added a test case in r<span style="font-family:arial,sans-serif;font-size:13px">185708.</span></div>

<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">- Ben</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
I will take a quick look at making this api a bit less error prone.<br>
<br>
Modified:<br>
    cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp<br>
<br>
Modified: cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp?rev=185707&r1=185706&r2=185707&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp?rev=185707&r1=185706&r2=185707&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp (original)<br>
+++ cfe/trunk/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp Fri Jul  5 10:05:40 2013<br>
@@ -247,8 +247,9 @@ void HTMLDiagnostics::ReportDiag(const P<br>
   SmallString<128> Model, ResultPath;<br>
   llvm::sys::path::append(Model, Directory, "report-%%%%%%.html");<br>
<br>
-  if (llvm::error_code EC =<br>
-          llvm::sys::fs::unique_file(Model.str(), FD, ResultPath)) {<br>
+  if (llvm::error_code EC = llvm::sys::fs::unique_file(<br>
+          Model.str(), FD, ResultPath, false,<br>
+          llvm::sys::fs::all_read | llvm::sys::fs::all_write)) {<br>
     llvm::errs() << "warning: could not create file in '" << Directory<br>
                  << "': " << EC.message() << '\n';<br>
     return;<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>