Use local_specializations to find capture proxies.
authorJason Merrill <jason@redhat.com>
Thu, 28 Sep 2017 19:39:38 +0000 (15:39 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 28 Sep 2017 19:39:38 +0000 (15:39 -0400)
commit5c263e84ab7e5df28a9055ae533c2d305f4b7b3d
treeb86cb1ba622a88cf4a14e1fd0e4b03bc38df3be7
parent697a7a575de01835b3941e6b6d25b940033301d5
Use local_specializations to find capture proxies.

* cp-tree.h (DECL_CAPTURED_VARIABLE): New.
* lambda.c (build_capture_proxy): Set it.
(add_capture): Pass initializer to build_capture_proxy.
(start_lambda_function): Likewise.
(insert_capture_proxy): Use register_local_specialization.
(is_lambda_ignored_entity): Always ignore proxies.
* name-lookup.c (qualify_lookup): Don't check
is_lambda_ignored_entity if LOOKUP_HIDDEN is set.
* semantics.c (process_outer_var_ref): Use
retrieve_local_specialization.
* parser.c (cp_parser_lambda_body): Push local_specializations.
* pt.c (tsubst_expr): Pass LOOKUP_HIDDEN when looking for a proxy.
(tsubst_lambda_expr): Push local_specializations sooner.
(tsubst_copy_and_build): Don't register_local_specialization.

From-SVN: r253265
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/lambda.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c