FreeBSD/contrib/gcc/cp/name-lookup.c
/* Make the declaration of X appear in CLASS scope.  */
Make the declaration of X appear in CLASS scope.
Make the declaration of X appear in CLASS scope .
bool
pushdecl_class_level (tree x)
{
  tree name;
  bool is_valid = true;
  timevar_push (TV_NAME_LOOKUP);
  if (TREE_CODE (x) == OVERLOAD)
    name = DECL_NAME (get_first_fn (x));
  else
    name = DECL_NAME (x);
  if (name)
    {
      is_valid = push_class_level_binding (name, x);
      if (TREE_CODE (x) == TYPE_DECL)
	set_identifier_type_value (name, x);
    }
  else if (ANON_AGGR_TYPE_P (TREE_TYPE (x)))
    {
      tree f;
      for (f = TYPE_FIELDS (TREE_TYPE (x)); f; f = TREE_CHAIN (f))
	{
	  location_t save_location = input_location;
	  input_location = DECL_SOURCE_LOCATION (f);
	  if (!pushdecl_class_level (f))
	    is_valid = false;
	  input_location = save_location;
	}
    }
  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, is_valid);
}
bool pushdecl_class_level ( tree x ) { tree name ; bool is_valid = true ; timevar_push ( TV_NAME_LOOKUP ) ; if ( TREE_CODE ( x ) == OVERLOAD ) name = DECL_NAME ( get_first_fn ( x ) ) ; else name = DECL_NAME ( x ) ; if ( name ) { is_valid = push_class_level_binding ( name , x ) ; if ( TREE_CODE ( x ) == TYPE_DECL ) set_identifier_type_value ( name , x ) ; } else if ( ANON_AGGR_TYPE_P ( TREE_TYPE ( x ) ) ) { tree f ; for ( f = TYPE_FIELDS ( TREE_TYPE ( x ) ) ; f ; f = TREE_CHAIN ( f ) ) { location_t save_location = input_location ; input_location = DECL_SOURCE_LOCATION ( f ) ; if ( ! pushdecl_class_level ( f ) ) is_valid = false ; input_location = save_location ; } } POP_TIMEVAR_AND_RETURN ( TV_NAME_LOOKUP , is_valid ) ; }
Make the declaration of X appear in CLASS scope.
Make the declaration of X appear in CLASS scope .
/* Get the name of X.  */ /* If X is an anonymous aggregate, all of its members are
	 treated as if they were members of the class containing the
	 aggregate, for naming purposes.  */