Commit 606358fa by Jakub Jelinek Committed by Jakub Jelinek

decl.c (cxx_maybe_build_cleanup): When clearing location of cleanup...

	* decl.c (cxx_maybe_build_cleanup): When clearing location of cleanup,
	if cleanup is a nop, clear location of its operand too.

From-SVN: r277084
parent e5b04038
2019-10-16 Jakub Jelinek <jakub@redhat.com>
* decl.c (cxx_maybe_build_cleanup): When clearing location of cleanup,
if cleanup is a nop, clear location of its operand too.
2019-10-15 Nathan Sidwell <nathan@acm.org>
* class.c (build_clones): Break out of clone_function_decl. Just
......
......@@ -16864,6 +16864,8 @@ cxx_maybe_build_cleanup (tree decl, tsubst_flags_t complain)
the end of the block. So let's unset the location of the
destructor call instead. */
protected_set_expr_location (cleanup, UNKNOWN_LOCATION);
if (cleanup && CONVERT_EXPR_P (cleanup))
protected_set_expr_location (TREE_OPERAND (cleanup, 0), UNKNOWN_LOCATION);
if (cleanup
&& DECL_P (decl)
......
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