diff options
author | Patrick Palka <ppalka@redhat.com> | 2022-05-10 11:52:29 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2022-05-10 11:52:29 -0400 |
commit | ee18dc41035725910f2b6e6c4283f3547f362ae9 (patch) | |
tree | c6959dcee438f4b6606342f6667e04691ea4c651 /gcc/cp/cp-tree.h | |
parent | dc6c96f0707aba6c2c94f41f3ccd0713381e372c (diff) | |
download | gcc-ee18dc41035725910f2b6e6c4283f3547f362ae9.zip gcc-ee18dc41035725910f2b6e6c4283f3547f362ae9.tar.gz gcc-ee18dc41035725910f2b6e6c4283f3547f362ae9.tar.bz2 |
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.
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 29fc0e5..cfda833 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3903,14 +3903,6 @@ struct GTY(()) lang_decl { (TREE_CODE (PACK_EXPANSION_CHECK (NODE)) == TYPE_PACK_EXPANSION \ ? TREE_TYPE (NODE) : TREE_OPERAND (NODE, 0)) -/* Sets the type or expression pattern for a TYPE_PACK_EXPANSION or - EXPR_PACK_EXPANSION. */ -#define SET_PACK_EXPANSION_PATTERN(NODE,VALUE) \ - if (TREE_CODE (PACK_EXPANSION_CHECK (NODE)) == TYPE_PACK_EXPANSION) \ - TREE_TYPE (NODE) = VALUE; \ - else \ - TREE_OPERAND (NODE, 0) = VALUE - /* The list of parameter packs used in the PACK_EXPANSION_* node. The TREE_VALUE of each TREE_LIST contains the parameter packs. */ #define PACK_EXPANSION_PARAMETER_PACKS(NODE) \ @@ -3963,14 +3955,6 @@ struct GTY(()) lang_decl { (TREE_CODE (ARGUMENT_PACK_CHECK (NODE)) == TYPE_ARGUMENT_PACK \ ? TREE_TYPE (NODE) : TREE_OPERAND (NODE, 0)) -/* Set the arguments stored in an argument pack. VALUE must be a - TREE_VEC. */ -#define SET_ARGUMENT_PACK_ARGS(NODE,VALUE) \ - if (TREE_CODE (ARGUMENT_PACK_CHECK (NODE)) == TYPE_ARGUMENT_PACK) \ - TREE_TYPE (NODE) = VALUE; \ - else \ - TREE_OPERAND (NODE, 0) = VALUE - /* Whether the argument pack is "incomplete", meaning that more arguments can still be deduced. Incomplete argument packs are only used when the user has provided an explicit template argument list |