FreeBSD/contrib/gcc/cp/class.c
/* Process the USING_DECL, which is a member of T.  */
Process the USING_DECL, which is a member of T.
Process the USING_DECL which is a member of T .
static void
handle_using_decl (tree using_decl, tree t)
{
  tree decl = USING_DECL_DECLS (using_decl);
  tree name = DECL_NAME (using_decl);
  tree access
    = TREE_PRIVATE (using_decl) ? access_private_node
    : TREE_PROTECTED (using_decl) ? access_protected_node
    : access_public_node;
  tree flist = NULL_TREE;
  tree old_value;
  gcc_assert (!processing_template_decl && decl);
  old_value = lookup_member (t, name, 0, false);
  if (old_value)
    {
      if (is_overloaded_fn (old_value))
	old_value = OVL_CURRENT (old_value);
      if (DECL_P (old_value) && DECL_CONTEXT (old_value) == t)
	;
      else
	old_value = NULL_TREE;
    }
  cp_emit_debug_info_for_using (decl, USING_DECL_SCOPE (using_decl));
  if (is_overloaded_fn (decl))
    flist = decl;
  if (! old_value)
    ;
  else if (is_overloaded_fn (old_value))
    {
      if (flist)
	;
      else
	{
	  error ("%q+D invalid in %q#T", using_decl, t);
	  error ("  because of local method %q+#D with same name",
		 OVL_CURRENT (old_value));
	  return;
	}
    }
  else if (!DECL_ARTIFICIAL (old_value))
    {
      error ("%q+D invalid in %q#T", using_decl, t);
      error ("  because of local member %q+#D with same name", old_value);
      return;
    }
  if (flist)
    for (; flist; flist = OVL_NEXT (flist))
      {
	add_method (t, OVL_CURRENT (flist), using_decl);
	alter_access (t, OVL_CURRENT (flist), access);
      }
  else
    alter_access (t, decl, access);
}
static void handle_using_decl ( tree using_decl , tree t ) { tree decl = USING_DECL_DECLS ( using_decl ) ; tree name = DECL_NAME ( using_decl ) ; tree access = TREE_PRIVATE ( using_decl ) ? access_private_node : TREE_PROTECTED ( using_decl ) ? access_protected_node : access_public_node ; tree flist = NULL_TREE ; tree old_value ; gcc_assert ( ! processing_template_decl && decl ) ; old_value = lookup_member ( t , name , 0 , false ) ; if ( old_value ) { if ( is_overloaded_fn ( old_value ) ) old_value = OVL_CURRENT ( old_value ) ; if ( DECL_P ( old_value ) && DECL_CONTEXT ( old_value ) == t ) ; else old_value = NULL_TREE ; } cp_emit_debug_info_for_using ( decl , USING_DECL_SCOPE ( using_decl ) ) ; if ( is_overloaded_fn ( decl ) ) flist = decl ; if ( ! old_value ) ; else if ( is_overloaded_fn ( old_value ) ) { if ( flist ) ; else { error ( " " , using_decl , t ) ; error ( " " , OVL_CURRENT ( old_value ) ) ; return ; } } else if ( ! DECL_ARTIFICIAL ( old_value ) ) { error ( " " , using_decl , t ) ; error ( " " , old_value ) ; return ; } if ( flist ) for ( ; flist ; flist = OVL_NEXT ( flist ) ) { add_method ( t , OVL_CURRENT ( flist ) , using_decl ) ; alter_access ( t , OVL_CURRENT ( flist ) , access ) ; } else alter_access ( t , decl , access ) ; }
Process the USING_DECL, which is a member of T.
Process the USING_DECL which is a member of T .
/*protect=*/ /*want_type=*/ /* OK */ /* It's OK to use functions from a base when there are functions with
	   the same name already present in the current class.  */ /* Make type T see field decl FDECL with access ACCESS.  */