call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 29 Mar 2013 23:12:33 +0000 (23:12 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 29 Mar 2013 23:12:33 +0000 (23:12 +0000)
2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>

* call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.

From-SVN: r197253

gcc/cp/ChangeLog
gcc/cp/call.c

index 16ea0743d6e755fa6829654d73bab7afc9ebcc78..dacc0f91065cff322fae77d5d88b63d329e5f743 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * call.c (build_op_call_1): Use TYPE_PTRFN_P and TYPE_REFFN_P.
+
 2013-03-29  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * call.c (add_builtin_candidate): Use TYPE_PTR_P and VOID_TYPE_P.
index 1c368ca8ce849b8cd6ad7d3b32767eeb14f3614f..5df6b475c8353cc54a168cf7999e2ff479df824e 100644 (file)
@@ -4082,13 +4082,10 @@ build_op_call_1 (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
       tree fns = TREE_VALUE (convs);
       tree totype = TREE_TYPE (convs);
 
-      if ((TYPE_PTR_P (totype)
-          && TREE_CODE (TREE_TYPE (totype)) == FUNCTION_TYPE)
+      if (TYPE_PTRFN_P (totype)
+         || TYPE_REFFN_P (totype)
          || (TREE_CODE (totype) == REFERENCE_TYPE
-             && TREE_CODE (TREE_TYPE (totype)) == FUNCTION_TYPE)
-         || (TREE_CODE (totype) == REFERENCE_TYPE
-             && TYPE_PTR_P (TREE_TYPE (totype))
-             && TREE_CODE (TREE_TYPE (TREE_TYPE (totype))) == FUNCTION_TYPE))
+             && TYPE_PTRFN_P (TREE_TYPE (totype))))
        for (; fns; fns = OVL_NEXT (fns))
          {
            tree fn = OVL_CURRENT (fns);