<div>On Wed, Mar 20, 2013 at 2:37 PM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br><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">
<div class="im">================<br>Comment at: lib/Sema/SemaExpr.cpp:2363-2364<br>@@ -2362,4 +2362,4 @@<br></div><div class="im">   if (!NeedsADL && R.isSingleResult() && !R.getAsSingle<FunctionTemplateDecl>())<br>
-    return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(),<br>-                                    R.getFoundDecl());<br>+    return BuildDeclarationNameExpr(SS, R.getLookupNameInfo(), R.getFoundDecl(),<br>+                                    R.getRepresentativeDecl());<br>
<br></div>----------------<br><div class="im">Richard Smith wrote:<br>> These arguments appear to be reversed from the declaration of BuildDeclarationNameExpr. Is that intentional?<br></div>I hope I am getting this right. I think they just mean different things. The confusion is about FoundD(ecl).<br>
<br>In the context of a DeclRefExpr, it seems to mean the actually referenced Decl, i.e. the UsingShadowDecl if it references through it. In the context of a LookupResult, the getFoundDecl() returns the underlying decl and getRepresentativeDecl() returns what would be the DeclRefExpr::getFoundDecl().<br>
</blockquote></div><div><br></div><div>I see. That's some unfortunate naming choices :-/</div><div><br></div>On Wed, Mar 20, 2013 at 2:45 PM, Daniel Jasper <span dir="ltr"><<a href="mailto:djasper@google.com" target="_blank">djasper@google.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  Looking at how/where to add a test, would clang/test/Misc/ast-dump-stmt.c be a good place?</blockquote><div><br></div><div>SGTM. </div></div>