<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 8, 2016 at 11:25 AM, Vassil Vassilev <span dir="ltr"><<a href="mailto:v.g.vassilev@gmail.com" target="_blank">v.g.vassilev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/02/16 20:10, Richard Smith via cfe-commits wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: rsmith<br>
Date: Mon Feb  8 13:10:14 2016<br>
New Revision: 260124<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260124&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=260124&view=rev</a><br>
Log:<br>
Remove dead code.<br>
<br>
Modified:<br>
     cfe/trunk/lib/Sema/SemaLookup.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaLookup.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=260124&r1=260123&r2=260124&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=260124&r1=260123&r2=260124&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Mon Feb  8 13:10:14 2016<br>
@@ -432,10 +432,6 @@ static bool isPreferredLookupResult(Sema<br>
      if (Prev == EUnderlying)<br>
        return true;<br>
    return false;<br>
-<br>
-  // If the existing declaration is hidden, prefer the new one. Otherwise,<br>
-  // keep what we've got.<br>
-  return !S.isVisible(Existing);<br>
</blockquote></span>
Shouldn't we generally prefer the new D if the Existing is hidden?</blockquote><div><br></div><div>We do in most cases; see the check a few lines above. This is only reached for the case of functions and variables, where picking the visible result can lose information. Note that when forming the set of declarations, we'll skip hidden results in cases where they're not an acceptable lookup result; in practice, we only get here for redeclaration lookup of a variable or function.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  }<br>
    /// Determine whether \p D can hide a tag declaration.<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>