<div dir="ltr">The concept generally seems fine.<div><br></div><div>The setLocalExternDecl thing seems a bit fiddly, since I'm pretty sure it can be derived from information we already keep around.  Did you consider computing that information on demand?</div>
<div><br></div><div>Do we compute the correct DeclContext for a friend in a local class which is a redeclaration of a local extern decl?  Might be nice to test.</div><div><br></div><div>It looks like some changes slipped in which should be committed separately (around where you added the reference to 6.2.7p2).</div>
<div><br></div><div>Does you patch work correctly with an extern local decl inside a block?  e.g. "void f() { ^{ void extern_decl(); extern_decl(); }(); }"?</div><div><br></div><div>That's all I can think of, at least for now.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 23, 2013 at 6:15 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi doug.gregor, eli.friedman,<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1499" target="_blank">http://llvm-reviews.chandlerc.com/D1499</a><br>
<br>
CHANGE SINCE LAST DIFF<br>
  <a href="http://llvm-reviews.chandlerc.com/D1499?vs=3726&id=3734#toc" target="_blank">http://llvm-reviews.chandlerc.com/D1499?vs=3726&id=3734#toc</a><br>
<br>
Files:<br>
  lib/Serialization/ASTReaderDecl.cpp<br>
  lib/Sema/SemaDeclCXX.cpp<br>
  lib/Sema/SemaAccess.cpp<br>
  lib/Sema/SemaTemplateInstantiateDecl.cpp<br>
  lib/Sema/SemaLookup.cpp<br>
  lib/Sema/SemaExpr.cpp<br>
  lib/Sema/SemaCodeComplete.cpp<br>
  lib/Sema/SemaDecl.cpp<br>
  test/Index/usrs.m<br>
  test/CXX/drs/dr0xx.cpp<br>
  test/CXX/dcl.decl/dcl.meaning/dcl.array/p3.cpp<br>
  test/CXX/basic/basic.link/p7.cpp<br>
  test/SemaCXX/cxx0x-initializer-references.cpp<br>
  test/SemaCXX/function-redecl.cpp<br>
  test/SemaCXX/warn-unreachable.cpp<br>
  test/SemaCXX/extern-c.cpp<br>
  test/CodeGenCXX/mangle.cpp<br>
  include/clang/Sema/Lookup.h<br>
  include/clang/Sema/Sema.h<br>
  include/clang/AST/DeclBase.h<br>
  include/clang/AST/Decl.h<br>
  www/cxx_dr_status.html<br>
</blockquote></div><br></div>