From c3b0f4c600b0a551132e52446bdccc23952fdefb Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 11 Jun 2017 01:29:34 -0400 Subject: [PATCH] * error.c (dump_expr): Use is_this_parameter. From-SVN: r249104 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/error.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index da085531209..6d2f28b8751 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2017-06-11 Jason Merrill + * error.c (dump_expr): Use is_this_parameter. + * cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use id_equal. diff --git a/gcc/cp/error.c b/gcc/cp/error.c index ed67d14567b..e53afa7522a 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2194,8 +2194,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) flags | TFF_EXPR_IN_PARENS); pp_cxx_dot (pp); } - else if (TREE_CODE (ob) != PARM_DECL - || strcmp (IDENTIFIER_POINTER (DECL_NAME (ob)), "this")) + else if (!is_this_parameter (ob)) { dump_expr (pp, ob, flags | TFF_EXPR_IN_PARENS); pp_cxx_arrow (pp); @@ -2276,9 +2275,7 @@ dump_expr (cxx_pretty_printer *pp, tree t, int flags) if (INDIRECT_REF_P (ob)) { ob = TREE_OPERAND (ob, 0); - if (TREE_CODE (ob) != PARM_DECL - || (DECL_NAME (ob) - && strcmp (IDENTIFIER_POINTER (DECL_NAME (ob)), "this"))) + if (!is_this_parameter (ob)) { dump_expr (pp, ob, flags | TFF_EXPR_IN_PARENS); if (TREE_CODE (TREE_TYPE (ob)) == REFERENCE_TYPE) -- 2.30.2