c++: Remove SET_PACK_EXPANSION_PATTERN / SET_ARGUMENT_PACK_ARGS
authorPatrick Palka <ppalka@redhat.com>
Tue, 10 May 2022 15:52:29 +0000 (11:52 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 10 May 2022 15:52:29 +0000 (11:52 -0400)
commitee18dc41035725910f2b6e6c4283f3547f362ae9
treec6959dcee438f4b6606342f6667e04691ea4c651
parentdc6c96f0707aba6c2c94f41f3ccd0713381e372c
c++: Remove SET_PACK_EXPANSION_PATTERN / SET_ARGUMENT_PACK_ARGS

Unlike in C, in C++ the conditional operator yields an lvalue if both
branches are lvalues, so these setter macros are unnecessary; we can
just assign to PACK_EXPANSION_PATTERN and ARGUMENT_PACK_ARGS directly.

gcc/cp/ChangeLog:

* coroutines.cc (instantiate_coro_traits): Adjust accordingly.
* cp-tree.def: Remove mention of SET_PACK_EXPANSION_PATTERN.
* cp-tree.h (SET_PACK_EXPANSION_PATTERN): Remove.
(SET_ARGUMENT_PACK_ARGS): Remove.
* module.cc (trees_in::tree_node): Adjust accordingly.
* parser.cc (make_char_string_pack): Likewise.
(make_string_pack): Likewise.
* pt.cc (make_pack_expansion): Likewise.
(template_parm_to_arg): Likewise.
(coerce_template_parameter_pack): Likewise.
(extract_fnparm_pack): Likewise.
(extract_locals_r): Likewise.
(make_argument_pack): Likewise.
(tsubst_argument_pack): Likewise.
(lookup_init_capture_pack): Likewise.
(type_unification_real): Likewise.
(unify_pack_expansion): Likewise.
(tsubst_initializer_list): Likewise.
gcc/cp/coroutines.cc
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/module.cc
gcc/cp/parser.cc
gcc/cp/pt.cc