On Jan 31, 2019, Jason Merrill <ja...@redhat.com> wrote:

> Let's use strip_using_decl instead
Aah, nice!  Thanks, I'll make the changes, test them, and post a new patch.


>> @@ -13288,7 +13295,8 @@ grok_special_member_properties (tree decl)
>> {
>> tree class_type;
>> -  if (!DECL_NONSTATIC_MEMBER_FUNCTION_P (decl))
>> +  if (TREE_CODE (decl) != USING_DECL
>> +      && !DECL_NONSTATIC_MEMBER_FUNCTION_P (decl))
>> return;

> Is there a reason not to use it here, as well?

The using decl will take us to a member of a different class, and this
function takes the DECL_CONTEXT of decl and adjusts the properties of
that class.  If we followed USING_DECLs in decl that early, we'd adjust
(again?) the member properties of USING_DECL_SCOPE(original using decl),
rather than of DECL_CONTEXT (original using decl) as intended.

-- 
Alexandre Oliva, freedom fighter   https://FSFLA.org/blogs/lxo
Be the change, be Free!         FSF Latin America board member
GNU Toolchain Engineer                Free Software Evangelist
Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

Reply via email to