Commit 06ab59df by Mark Mitchell Committed by Mark Mitchell

tree.c (is_overloaded_fn): Use really_overloaded_fn.

	* tree.c (is_overloaded_fn): Use really_overloaded_fn.
	(really_overloaded_fn): Move check here from is_overloaded_fn.
	(get_first_fn): Use really_overloaded_fn and is_overloaded_fn.

From-SVN: r17863
parent cc1e5b9a
Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
* tree.c (is_overloaded_fn): Use really_overloaded_fn.
(really_overloaded_fn): Move check here from is_overloaded_fn.
(get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net> Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
* cp-tree.h (push_template_decl): Return the decl passed in, or an * cp-tree.h (push_template_decl): Return the decl passed in, or an
......
...@@ -1299,39 +1299,31 @@ int ...@@ -1299,39 +1299,31 @@ int
is_overloaded_fn (x) is_overloaded_fn (x)
tree x; tree x;
{ {
if (TREE_CODE (x) == FUNCTION_DECL return (TREE_CODE (x) == FUNCTION_DECL
|| TREE_CODE (x) == TEMPLATE_ID_EXPR || TREE_CODE (x) == TEMPLATE_ID_EXPR
|| DECL_FUNCTION_TEMPLATE_P (x)) || DECL_FUNCTION_TEMPLATE_P (x)
return 1; || really_overloaded_fn (x));
if (TREE_CODE (x) == TREE_LIST
&& (TREE_CODE (TREE_VALUE (x)) == FUNCTION_DECL
|| DECL_FUNCTION_TEMPLATE_P (TREE_VALUE (x))))
return 1;
return 0;
} }
int int
really_overloaded_fn (x) really_overloaded_fn (x)
tree x; tree x;
{ {
return TREE_CODE (x) != FUNCTION_DECL return (TREE_CODE (x) == TREE_LIST
&& is_overloaded_fn (x); && (TREE_CODE (TREE_VALUE (x)) == FUNCTION_DECL
|| DECL_FUNCTION_TEMPLATE_P (TREE_VALUE (x))));
} }
tree tree
get_first_fn (from) get_first_fn (from)
tree from; tree from;
{ {
if (TREE_CODE (from) == FUNCTION_DECL my_friendly_assert (is_overloaded_fn (from), 9);
|| TREE_CODE (from) == TEMPLATE_ID_EXPR
|| DECL_FUNCTION_TEMPLATE_P (from))
return from;
my_friendly_assert (TREE_CODE (from) == TREE_LIST, 9); if (really_overloaded_fn (from))
return TREE_VALUE (from);
return TREE_VALUE (from); else
return from;
} }
int int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment