tree.c (is_overloaded_fn): Use really_overloaded_fn.
authorMark Mitchell <mmitchell@usa.net>
Wed, 11 Feb 1998 22:47:30 +0000 (22:47 +0000)
committerMark Mitchell <mmitchell@gcc.gnu.org>
Wed, 11 Feb 1998 22:47:30 +0000 (22:47 +0000)
* 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

gcc/cp/ChangeLog
gcc/cp/tree.c

index e944c6e68fa9d28b68dd5bbf9559c9534ff91b5f..8534f1ae0c596cbf1555bb4d8e1386c59007b682 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        * cp-tree.h (push_template_decl): Return the decl passed in, or an
index 6ad57402be43df47984b57d3baeae331d3ac7da5..1bd60f177b52ce01bc397346ab60f83a20ffffb6 100644 (file)
@@ -1299,39 +1299,31 @@ int
 is_overloaded_fn (x)
      tree x;
 {
-  if (TREE_CODE (x) == FUNCTION_DECL
-      || TREE_CODE (x) == TEMPLATE_ID_EXPR
-      || DECL_FUNCTION_TEMPLATE_P (x))
-    return 1;
-
-  if (TREE_CODE (x) == TREE_LIST
-      && (TREE_CODE (TREE_VALUE (x)) == FUNCTION_DECL
-         || DECL_FUNCTION_TEMPLATE_P (TREE_VALUE (x))))
-    return 1;
-
-  return 0;
+  return (TREE_CODE (x) == FUNCTION_DECL
+         || TREE_CODE (x) == TEMPLATE_ID_EXPR
+         || DECL_FUNCTION_TEMPLATE_P (x)
+         || really_overloaded_fn (x));
 }
 
 int
 really_overloaded_fn (x)
      tree x;
 {     
-  return TREE_CODE (x) != FUNCTION_DECL 
-    && is_overloaded_fn (x);
+  return (TREE_CODE (x) == TREE_LIST
+         && (TREE_CODE (TREE_VALUE (x)) == FUNCTION_DECL
+             || DECL_FUNCTION_TEMPLATE_P (TREE_VALUE (x))));
 }
 
 tree
 get_first_fn (from)
      tree from;
 {
-  if (TREE_CODE (from) == FUNCTION_DECL
-      || TREE_CODE (from) == TEMPLATE_ID_EXPR
-      || DECL_FUNCTION_TEMPLATE_P (from))
-    return from;
+  my_friendly_assert (is_overloaded_fn (from), 9);
 
-  my_friendly_assert (TREE_CODE (from) == TREE_LIST, 9);
-  
-  return TREE_VALUE (from);
+  if (really_overloaded_fn (from))
+    return TREE_VALUE (from);
+  else
+    return from;
 }
 
 int