FreeBSD/contrib/gcc/cp/decl.c
/* Remember any special properties of member function DECL.  */
Remember any special properties of member function DECL.
Remember any special properties of member function DECL .
void grok_special_member_properties (tree decl)
{
  tree class_type;
  if (!DECL_NONSTATIC_MEMBER_FUNCTION_P (decl))
    return;
  class_type = DECL_CONTEXT (decl);
  if (DECL_CONSTRUCTOR_P (decl))
    {
      int ctor = copy_fn_p (decl);
      TYPE_HAS_CONSTRUCTOR (class_type) = 1;
      if (ctor > 0)
	{
	  TYPE_HAS_INIT_REF (class_type) = 1;
	  if (ctor > 1)
	    TYPE_HAS_CONST_INIT_REF (class_type) = 1;
	}
      else if (sufficient_parms_p (FUNCTION_FIRST_USER_PARMTYPE (decl)))
	TYPE_HAS_DEFAULT_CONSTRUCTOR (class_type) = 1;
    }
  else if (DECL_OVERLOADED_OPERATOR_P (decl) == NOP_EXPR)
    {
      int assop = copy_fn_p (decl);
      if (assop)
	{
	  TYPE_HAS_ASSIGN_REF (class_type) = 1;
	  if (assop != 1)
	    TYPE_HAS_CONST_ASSIGN_REF (class_type) = 1;
	}
    }
}
void grok_special_member_properties ( tree decl ) { tree class_type ; if ( ! DECL_NONSTATIC_MEMBER_FUNCTION_P ( decl ) ) return ; class_type = DECL_CONTEXT ( decl ) ; if ( DECL_CONSTRUCTOR_P ( decl ) ) { int ctor = copy_fn_p ( decl ) ; TYPE_HAS_CONSTRUCTOR ( class_type ) = 1 ; if ( ctor > 0 ) { TYPE_HAS_INIT_REF ( class_type ) = 1 ; if ( ctor > 1 ) TYPE_HAS_CONST_INIT_REF ( class_type ) = 1 ; } else if ( sufficient_parms_p ( FUNCTION_FIRST_USER_PARMTYPE ( decl ) ) ) TYPE_HAS_DEFAULT_CONSTRUCTOR ( class_type ) = 1 ; } else if ( DECL_OVERLOADED_OPERATOR_P ( decl ) == NOP_EXPR ) { int assop = copy_fn_p ( decl ) ; if ( assop ) { TYPE_HAS_ASSIGN_REF ( class_type ) = 1 ; if ( assop != 1 ) TYPE_HAS_CONST_ASSIGN_REF ( class_type ) = 1 ; } } }
Remember any special properties of member function DECL.
Remember any special properties of member function DECL .
/* [class.copy]

	     A non-template constructor for class X is a copy
	     constructor if its first parameter is of type X&, const
	     X&, volatile X& or const volatile X&, and either there
	     are no other parameters or else all other parameters have
	     default arguments.  */ /* [class.copy]

	 A non-template assignment operator for class X is a copy
	 assignment operator if its parameter is of type X, X&, const
	 X&, volatile X& or const volatile X&.  */