FreeBSD/contrib/gcc/cp/tree.c
/* Returns non-zero if X is an expression for a (possibly overloaded)
   function.  If "f" is a function or function template, "f", "c->f",
   "c.f", "C::f", and "f<int>" will all be considered possibly
   overloaded functions.  Returns 2 if the function is actually
   overloaded, i.e., if it is impossible to know the the type of the
   function without performing overload resolution.  */
Returns non-zero if X is an expression for a (possibly overloaded)
function.
Returns non - zero if X is an expression for a ( possibly overloaded ) function .
int
is_overloaded_fn (tree x)
{
  if (TREE_CODE (x) == OFFSET_REF
      || TREE_CODE (x) == COMPONENT_REF)
    x = TREE_OPERAND (x, 1);
  if (BASELINK_P (x))
    x = BASELINK_FUNCTIONS (x);
  if (TREE_CODE (x) == TEMPLATE_ID_EXPR
      || DECL_FUNCTION_TEMPLATE_P (OVL_CURRENT (x))
      || (TREE_CODE (x) == OVERLOAD && OVL_CHAIN (x)))
    return 2;
  return  (TREE_CODE (x) == FUNCTION_DECL
	   || TREE_CODE (x) == OVERLOAD);
}
int is_overloaded_fn ( tree x ) { if ( TREE_CODE ( x ) == OFFSET_REF || TREE_CODE ( x ) == COMPONENT_REF ) x = TREE_OPERAND ( x , 1 ) ; if ( BASELINK_P ( x ) ) x = BASELINK_FUNCTIONS ( x ) ; if ( TREE_CODE ( x ) == TEMPLATE_ID_EXPR || DECL_FUNCTION_TEMPLATE_P ( OVL_CURRENT ( x ) ) || ( TREE_CODE ( x ) == OVERLOAD && OVL_CHAIN ( x ) ) ) return 2 ; return ( TREE_CODE ( x ) == FUNCTION_DECL || TREE_CODE ( x ) == OVERLOAD ) ; }
Returns non-zero if X is an expression for a (possibly overloaded)
function.
Returns non - zero if X is an expression for a ( possibly overloaded ) function .
/* A baselink is also considered an overloaded function.  */