pt.c (build_non_dependent_expr): Remove special handling of REFERENCE_REF_P.
authorJason Merrill <jason@redhat.com>
Wed, 1 Jun 2011 20:37:20 +0000 (16:37 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 1 Jun 2011 20:37:20 +0000 (16:37 -0400)
* pt.c (build_non_dependent_expr): Remove special handling of
REFERENCE_REF_P.

From-SVN: r174545

gcc/cp/ChangeLog
gcc/cp/pt.c

index bf79bb6891713491159a612187389634f26b21e6..b53331d5da1bdc0a4c2616eaf1b0fdb8e861a840 100644 (file)
@@ -1,5 +1,8 @@
 2011-06-01  Jason Merrill  <jason@redhat.com>
 
+       * pt.c (build_non_dependent_expr): Remove special handling of
+       REFERENCE_REF_P.
+
        PR c++/44175
        * pt.c (template_args_equal): Handle one arg being NULL_TREE.
        (deduction_tsubst_fntype): Handle excessive non-infinite recursion.
index c1bee3e05523c06a1bae9c9e464757b16562514c..c9557770ccc1bc97e63fe8cb284fc806cd8f5b40 100644 (file)
@@ -19189,12 +19189,6 @@ build_non_dependent_expr (tree expr)
                   TREE_OPERAND (expr, 0),
                   build_non_dependent_expr (TREE_OPERAND (expr, 1)));
 
-  /* Keep dereferences outside the NON_DEPENDENT_EXPR so lvalue_kind
-     doesn't need to look inside.  */
-  if (REFERENCE_REF_P (expr))
-    return convert_from_reference (build_non_dependent_expr
-                                  (TREE_OPERAND (expr, 0)));
-
   /* If the type is unknown, it can't really be non-dependent */
   gcc_assert (TREE_TYPE (expr) != unknown_type_node);