FreeBSD/contrib/gcc/cp/call.c
/* Returns nonzero iff the destructor name specified in NAME matches BASETYPE.
   NAME can take many forms...  */
Returns nonzero iff the destructor name specified in NAME matches BASETYPE.
NAME can take many forms
Returns nonzero iff the destructor name specified in NAME matches BASETYPE . NAME can take many forms
bool
check_dtor_name (tree basetype, tree name)
{
  if (name == error_mark_node)
    return true;
  if (TREE_CODE (name) == TYPE_DECL)
    name = TREE_TYPE (name);
  else if (TYPE_P (name))
    ;
  else if (TREE_CODE (name) == IDENTIFIER_NODE)
    {
      if ((IS_AGGR_TYPE (basetype) && name == constructor_name (basetype))
	  || (TREE_CODE (basetype) == ENUMERAL_TYPE
	      && name == TYPE_IDENTIFIER (basetype)))
	return true;
      else
	name = get_type_value (name);
    }
  else
    {
      gcc_assert (DECL_CLASS_TEMPLATE_P (name));
      return false;
    }
  if (!name)
    return false;
  return same_type_p (TYPE_MAIN_VARIANT (basetype), TYPE_MAIN_VARIANT (name));
}
bool check_dtor_name ( tree basetype , tree name ) { if ( name == error_mark_node ) return true ; if ( TREE_CODE ( name ) == TYPE_DECL ) name = TREE_TYPE ( name ) ; else if ( TYPE_P ( name ) ) ; else if ( TREE_CODE ( name ) == IDENTIFIER_NODE ) { if ( ( IS_AGGR_TYPE ( basetype ) && name == constructor_name ( basetype ) ) || ( TREE_CODE ( basetype ) == ENUMERAL_TYPE && name == TYPE_IDENTIFIER ( basetype ) ) ) return true ; else name = get_type_value ( name ) ; } else { gcc_assert ( DECL_CLASS_TEMPLATE_P ( name ) ) ; return false ; } if ( ! name ) return false ; return same_type_p ( TYPE_MAIN_VARIANT ( basetype ) , TYPE_MAIN_VARIANT ( name ) ) ; }
Returns nonzero iff the destructor name specified in NAME matches BASETYPE.
Returns nonzero iff the destructor name specified in NAME matches BASETYPE .
/* Just accept something we've already complained about.  */ /* OK */ /* In the case of:

	 template <class T> struct S { ~S(); };
	 int i;
	 i.~S();

	 NAME will be a class template.  */