On 12/28/2014 01:45 PM, Momchil Velikov wrote:
+ if (!hidden_friend) + { + DECL_ANTICIPATED (olddecl) = 0; + DECL_HIDDEN_FRIEND_P (olddecl) = 0; + }
Why not add this...
@@ -2147,10 +2160,6 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) if (DECL_DECLARES_FUNCTION_P (newdecl)) { DECL_NONCONVERTING_P (newdecl) = DECL_NONCONVERTING_P (olddecl); - olddecl_friend = DECL_FRIEND_P (olddecl); - hidden_friend = (DECL_ANTICIPATED (olddecl) - && DECL_HIDDEN_FRIEND_P (olddecl) - && newdecl_is_friend);
...here? I don't see a reason why a function template wouldn't hit this block.
Jason