aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 15894fc..0d0a10ec 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -141,7 +141,7 @@ mark_use (tree expr, bool rvalue_p, bool read_p,
}
expr = process_outer_var_ref (expr, tf_warning_or_error, true);
if (!(TREE_TYPE (oexpr)
- && TREE_CODE (TREE_TYPE (oexpr)) == REFERENCE_TYPE))
+ && TYPE_REF_P (TREE_TYPE (oexpr))))
expr = convert_from_reference (expr);
}
break;
@@ -166,7 +166,7 @@ mark_use (tree expr, bool rvalue_p, bool read_p,
{
/* Look through capture by reference. */
tree cap = DECL_CAPTURED_VARIABLE (ref);
- if (TREE_CODE (TREE_TYPE (cap)) != REFERENCE_TYPE
+ if (!TYPE_REF_P (TREE_TYPE (cap))
&& decl_constant_var_p (cap))
{
tree val = RECUR (cap);