LAMBDA_EXPR_MUTABLE_P (r) = LAMBDA_EXPR_MUTABLE_P (t);
LAMBDA_EXPR_INSTANTIATED (r) = true;
- if (LAMBDA_EXPR_EXTRA_SCOPE (t) == NULL_TREE)
- /* A lambda in a default argument outside a class gets no
- LAMBDA_EXPR_EXTRA_SCOPE, as specified by the ABI. But
- tsubst_default_argument calls start_lambda_scope, so we need to
- specifically ignore it here, and use the global scope. */
- record_null_lambda_scope (r);
- else
- record_lambda_scope (r);
-
gcc_assert (LAMBDA_EXPR_THIS_CAPTURE (t) == NULL_TREE
&& LAMBDA_EXPR_PENDING_PROXIES (t) == NULL);
if (type == error_mark_node)
return error_mark_node;
+ if (LAMBDA_EXPR_EXTRA_SCOPE (t) == NULL_TREE)
+ /* A lambda in a default argument outside a class gets no
+ LAMBDA_EXPR_EXTRA_SCOPE, as specified by the ABI. But
+ tsubst_default_argument calls start_lambda_scope, so we need to
+ specifically ignore it here, and use the global scope. */
+ record_null_lambda_scope (r);
+ else
+ record_lambda_scope (r);
+
/* Do this again now that LAMBDA_EXPR_EXTRA_SCOPE is set. */
determine_visibility (TYPE_NAME (type));
if (VAR_P (d))
{
- tree init;
- bool const_init = false;
-
/* Clear out DECL_RTL; whatever was there before may not be right
since we've reset the type of the declaration. */
SET_DECL_RTL (d, NULL);
regenerate_decl_from_template so we don't need to
push/pop_access_scope again here. Pull it out so that
cp_finish_decl can process it. */
- init = DECL_INITIAL (d);
+ bool const_init = false;
+ tree init = DECL_INITIAL (d);
DECL_INITIAL (d) = NULL_TREE;
DECL_INITIALIZED_P (d) = 0;