<div>Please move the tests into test/CodeGenCXX, merge into existing test files, and ensure that -emit-llvm is on the RUN: line. Maybe cxx11-thread-local.cpp for the first test and anonymous-namespaces.cpp for the second one?</div>
<div><br></div>Otherwise, LGTM, thanks!<br><br><div class="gmail_quote">On Wed, May 15, 2013 at 6:17 AM, Enea Zaffanella <span dir="ltr"><<a href="mailto:zaffanella@cs.unipr.it" target="_blank">zaffanella@cs.unipr.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 05/14/2013 10:21 PM, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The call to hasExternalFormalLinkage in CGDecl.cpp should be to<br>
hasExternalStorage. Consider:<br>
<br>
namespace {<br>
   int a;<br>
<br>
   int f() {<br>
     extern int a;<br>
     return a;<br>
   }<br>
}<br>
<br>
Here, the 'a' inside 'f' has InternalLinkage but ExternalStorage. We<br>
definitely don't want to emit that as an automatic-storage-duration<br>
variable. Please also add an assert(D.hasLocalStorage()) before the call<br>
to EmitAutoVarDecl.<br>
</blockquote>
<br>
<br></div>
Done as suggested (added both testcases).<span class="HOEnZb"><font color="#888888"><br>
<br>
Enea.<br>
<br>
</font></span></blockquote></div><br>