diff options
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index d5d29127cfd..4ac9445ecc9 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -188,11 +188,6 @@ cp_build_parm_decl (tree name, tree type) if (!processing_template_decl) DECL_ARG_TYPE (parm) = type_passed_as (type); - /* If the type is a pack expansion, then we have a function - parameter pack. */ - if (type && TREE_CODE (type) == TYPE_PACK_EXPANSION) - FUNCTION_PARAMETER_PACK_P (parm) = 1; - return parm; } @@ -507,8 +502,9 @@ check_member_template (tree tmpl) || (TREE_CODE (decl) == TYPE_DECL && MAYBE_CLASS_TYPE_P (TREE_TYPE (decl)))) { - /* The parser rejects template declarations in local classes. */ - gcc_assert (!current_function_decl); + /* The parser rejects template declarations in local classes + (with the exception of generic lambdas). */ + gcc_assert (!current_function_decl || LAMBDA_FUNCTION_P (decl)); /* The parser rejects any use of virtual in a function template. */ gcc_assert (!(TREE_CODE (decl) == FUNCTION_DECL && DECL_VIRTUAL_P (decl))); |