diff options
author | Jason Merrill <jason@redhat.com> | 2015-11-19 17:29:08 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-11-19 17:29:08 -0500 |
commit | e3f8abd61ed3ecf6e3fabd2937b05c501dd981e1 (patch) | |
tree | 15bc86c5ea964297c911b3096e4a921624dfebab /gcc/cp/cp-tree.h | |
parent | 0766660bf94087754e89959cb4b1f27660f30afe (diff) | |
download | gcc-e3f8abd61ed3ecf6e3fabd2937b05c501dd981e1.zip gcc-e3f8abd61ed3ecf6e3fabd2937b05c501dd981e1.tar.gz gcc-e3f8abd61ed3ecf6e3fabd2937b05c501dd981e1.tar.bz2 |
re PR c++/68422 (compile-time cost of sizeof... is quadratic)
PR c++/68422
* cp-tree.h (PACK_EXPANSION_SIZEOF_P): New.
* parser.c (cp_parser_sizeof_pack): Set it.
* pt.c (tsubst_copy) [SIZEOF_EXPR]: Likewise.
(tsubst_pack_expansion): Improve T... shortcut for expression packs.
From-SVN: r230629
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 160bf1e..14ea119 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -98,6 +98,7 @@ c-common.h, not after. DECLTYPE_FOR_INIT_CAPTURE (in DECLTYPE_TYPE) CONSTRUCTOR_NO_IMPLICIT_ZERO (in CONSTRUCTOR) TINFO_USED_TEMPLATE_ID (in TEMPLATE_INFO) + PACK_EXPANSION_SIZEOF_P (in *_PACK_EXPANSION) 2: IDENTIFIER_OPNAME_P (in IDENTIFIER_NODE) ICS_THIS_FLAG (in _CONV) DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (in VAR_DECL) @@ -3200,6 +3201,9 @@ extern void decl_shadowed_for_var_insert (tree, tree); /* True iff this pack expansion is within a function context. */ #define PACK_EXPANSION_LOCAL_P(NODE) TREE_LANG_FLAG_0 (NODE) +/* True iff this pack expansion is for sizeof.... */ +#define PACK_EXPANSION_SIZEOF_P(NODE) TREE_LANG_FLAG_1 (NODE) + /* True iff the wildcard can match a template parameter pack. */ #define WILDCARD_PACK_P(NODE) TREE_LANG_FLAG_0 (NODE) |