* [pushed] c++: Call tsubst_pack_expansion from tsubst.
@ 2020-11-09 20:18 Jason Merrill
0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2020-11-09 20:18 UTC (permalink / raw)
To: gcc-patches
This was unnecessary (and incomplete) code duplication.
Tested x86_64-pc-linux-gnu, applying to trunk.
gcc/cp/ChangeLog:
* pt.c (tsubst): Replace *_ARGUMENT_PACK code with
a call to tsubst_argument_pack.
---
gcc/cp/pt.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2a885a90857..88644b9556b 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -16060,20 +16060,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
case TYPE_ARGUMENT_PACK:
case NONTYPE_ARGUMENT_PACK:
- {
- tree r;
-
- if (code == NONTYPE_ARGUMENT_PACK)
- r = make_node (code);
- else
- r = cxx_make_type (code);
-
- tree pack_args = ARGUMENT_PACK_ARGS (t);
- pack_args = tsubst_template_args (pack_args, args, complain, in_decl);
- SET_ARGUMENT_PACK_ARGS (r, pack_args);
-
- return r;
- }
+ return tsubst_argument_pack (t, args, complain, in_decl);
case VOID_CST:
case INTEGER_CST:
base-commit: 38b17c27ce5a8e0cc5baa14697d4b5542b91b9d1
--
2.18.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-09 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 20:18 [pushed] c++: Call tsubst_pack_expansion from tsubst Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).