2017-06-11 Jason Merrill <jason@redhat.com>
+ * error.c (dump_expr): Use is_this_parameter.
+
* cp-tree.h, decl2.c, mangle.c, parser.c, pt.c, semantics.c: Use
id_equal.
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);
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)