diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a16aef6..d720c33 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -23460,6 +23460,9 @@ instantiate_decl (tree d, bool defer_ok, bool expl_inst_class_mem_p) bool push_to_top, nested; tree fn_context; fn_context = decl_function_context (d); + if (LAMBDA_FUNCTION_P (d)) + /* tsubst_lambda_expr resolved any references to enclosing functions. */ + fn_context = NULL_TREE; nested = current_function_decl != NULL_TREE; push_to_top = !(nested && fn_context == current_function_decl); |