r260124 - Remove dead code.

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 11:39:56 PST 2016


On 08/02/16 20:38, Richard Smith wrote:
> On Mon, Feb 8, 2016 at 11:25 AM, Vassil Vassilev 
> <v.g.vassilev at gmail.com <mailto:v.g.vassilev at gmail.com>> wrote:
>
>     On 08/02/16 20:10, Richard Smith via cfe-commits wrote:
>
>         Author: rsmith
>         Date: Mon Feb  8 13:10:14 2016
>         New Revision: 260124
>
>         URL: http://llvm.org/viewvc/llvm-project?rev=260124&view=rev
>         Log:
>         Remove dead code.
>
>         Modified:
>              cfe/trunk/lib/Sema/SemaLookup.cpp
>
>         Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
>         URL:
>         http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=260124&r1=260123&r2=260124&view=diff
>         ==============================================================================
>         --- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
>         +++ cfe/trunk/lib/Sema/SemaLookup.cpp Mon Feb  8 13:10:14 2016
>         @@ -432,10 +432,6 @@ static bool isPreferredLookupResult(Sema
>               if (Prev == EUnderlying)
>                 return true;
>             return false;
>         -
>         -  // If the existing declaration is hidden, prefer the new
>         one. Otherwise,
>         -  // keep what we've got.
>         -  return !S.isVisible(Existing);
>
>     Shouldn't we generally prefer the new D if the Existing is hidden?
>
>
> 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.
Got it, thanks!
>
>           }
>             /// Determine whether \p D can hide a tag declaration.
>
>
>         _______________________________________________
>         cfe-commits mailing list
>         cfe-commits at lists.llvm.org <mailto:cfe-commits at lists.llvm.org>
>         http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160208/8da54fc8/attachment.html>


More information about the cfe-commits mailing list