Commit 32f3d032 by Jason Merrill Committed by Jason Merrill

method.c (build_stub_object): Use CONVERT_EXPR.

	* method.c (build_stub_object): Use CONVERT_EXPR.
	* tree.c (build_dummy_object): Likewise.
	(is_dummy_object): Adjust.

From-SVN: r215736
parent 8d0cf15e
2014-09-30 Jason Merrill <jason@redhat.com>
* method.c (build_stub_object): Use CONVERT_EXPR.
* tree.c (build_dummy_object): Likewise.
(is_dummy_object): Adjust.
* cp-tree.h (cp_trait_kind): Remove CPTK_IS_CONVERTIBLE_TO.
* cxx-pretty-print.c (pp_cxx_trait_expression): Likewise.
* semantics.c (trait_expr_value): Likewise.
......
......@@ -852,7 +852,7 @@ build_stub_type (tree type, int quals, bool rvalue)
static tree
build_stub_object (tree reftype)
{
tree stub = build1 (NOP_EXPR, reftype, integer_one_node);
tree stub = build1 (CONVERT_EXPR, reftype, integer_one_node);
return convert_from_reference (stub);
}
......
......@@ -2979,7 +2979,7 @@ member_p (const_tree decl)
tree
build_dummy_object (tree type)
{
tree decl = build1 (NOP_EXPR, build_pointer_type (type), void_node);
tree decl = build1 (CONVERT_EXPR, build_pointer_type (type), void_node);
return cp_build_indirect_ref (decl, RO_NULL, tf_warning_or_error);
}
......@@ -3028,7 +3028,7 @@ is_dummy_object (const_tree ob)
{
if (INDIRECT_REF_P (ob))
ob = TREE_OPERAND (ob, 0);
return (TREE_CODE (ob) == NOP_EXPR
return (TREE_CODE (ob) == CONVERT_EXPR
&& TREE_OPERAND (ob, 0) == void_node);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment