]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Move CALL_FROM_NEW_OR_DELETE_P to tree.h
authorJason Merrill <jason@redhat.com>
Thu, 1 Oct 2020 08:08:58 +0000 (10:08 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 2 Oct 2020 09:21:28 +0000 (11:21 +0200)
commitb6158faacbfb7d24a1d25b3774bc4338dd849480
tree504ac11d39caf4dcd7cd038bdda69ec153d42e18
parent6a0423c52ef56d6fc2e0392b91bf22941fdeb0db
c++: Move CALL_FROM_NEW_OR_DELETE_P to tree.h

As discussed with richi, we should be able to use TREE_PROTECTED for this
flag, since CALL_FROM_THUNK_P will never be set on a call to an operator new
or delete.

2020-10-01  Jason Merril  <jason@redhat.com>

gcc/cp/ChangeLog:
* lambda.c (call_from_lambda_thunk_p): New.
* cp-gimplify.c (cp_genericize_r): Use it.
* pt.c (tsubst_copy_and_build): Use it.
* typeck.c (check_return_expr): Use it.
* cp-tree.h: Declare it.
(CALL_FROM_NEW_OR_DELETE_P): Move to gcc/tree.h.

gcc/ChangeLog:
* tree.h (CALL_FROM_NEW_OR_DELETE_P): Move from cp-tree.h.
* tree-core.h: Document new usage of protected_flag.
gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.h
gcc/cp/lambda.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/tree-core.h
gcc/tree.h