FreeBSD/contrib/gcc/cp/tree.c
/* We've gotten a reference to a member of TYPE.  Return *this if appropriate,
   or a dummy object otherwise.  If BINFOP is non-0, it is filled with the
   binfo path from current_class_type to TYPE, or 0.  */
We've gotten a reference to a member of TYPE.  Return *this if appropriate,
or a dummy object otherwise.  If BINFOP is non-0, it is filled with the
binfo path from current_class_type to TYPE, or 0.
We ' ve gotten a reference to a member of TYPE . Return * this if appropriate or a dummy object otherwise . If BINFOP is non - 0 it is filled with the binfo path from current_class_type to TYPE or 0 .
tree
maybe_dummy_object (tree type, tree* binfop)
{
  tree decl, context;
  tree binfo;
  if (current_class_type
      && (binfo = lookup_base (current_class_type, type,
			       ba_unique | ba_quiet, NULL)))
    context = current_class_type;
  else
    {
      context = type;
      binfo = TYPE_BINFO (type);
    }
  if (binfop)
    *binfop = binfo;
  if (current_class_ref && context == current_class_type
      && same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (current_class_ref)),
		      current_class_type))
    decl = current_class_ref;
    else if (cur_block)
    {
      tree this_copiedin_var = lookup_name (this_identifier);
      gcc_assert (!current_class_ref);
      gcc_assert (this_copiedin_var);
      decl = build_x_arrow (this_copiedin_var);
    }  
  else
    decl = build_dummy_object (context);
  return decl;
}
tree maybe_dummy_object ( tree type , tree * binfop ) { tree decl , context ; tree binfo ; if ( current_class_type && ( binfo = lookup_base ( current_class_type , type , ba_unique | ba_quiet , NULL ) ) ) context = current_class_type ; else { context = type ; binfo = TYPE_BINFO ( type ) ; } if ( binfop ) * binfop = binfo ; if ( current_class_ref && context == current_class_type && same_type_p ( TYPE_MAIN_VARIANT ( TREE_TYPE ( current_class_ref ) ) , current_class_type ) ) decl = current_class_ref ; else if ( cur_block ) { tree this_copiedin_var = lookup_name ( this_identifier ) ; gcc_assert ( ! current_class_ref ) ; gcc_assert ( this_copiedin_var ) ; decl = build_x_arrow ( this_copiedin_var ) ; } else decl = build_dummy_object ( context ) ; return decl ; }
We've gotten a reference to a member of TYPE.
We ' ve gotten a reference to a member of TYPE .
/* Reference from a nested class member function.  */ /* Kludge: Make sure that current_class_type is actually
	 correct.  It might not be if we're in the middle of
	 tsubst_default_argument.  */ /* APPLE LOCAL begin radar 6154598 */ /* APPLE LOCAL end radar 6154598 */