PR c++/82514 - ICE with local class in generic lambda.
authorJason Merrill <jason@redhat.com>
Fri, 26 Jan 2018 15:25:23 +0000 (10:25 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 26 Jan 2018 15:25:23 +0000 (10:25 -0500)
commit373d1f5f055ee378e8e773df331da85d0cffc89b
tree35664820e2bc902f230321fc05bccf7a4ba9a335
parenta9ea161d628b73aafc07960797031c3b66ccfe9c
PR c++/82514 - ICE with local class in generic lambda.

* pt.c (regenerated_lambda_fn_p): Remove.
(enclosing_instantiation_of): Don't use it.
(tsubst_function_decl): Call enclosing_instantiation_of.

* pt.c (lookup_template_class_1): Add sanity check.
* name-lookup.c (do_pushtag): Don't add closures to local_classes.

From-SVN: r257093
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1y/lambda-generic-nested2.C [new file with mode: 0644]