Use local_specializations to find capture proxies.
commit6f20c78581397079216efbe5edfd1800b2fd5988
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Sep 2017 19:39:38 +0000 (28 19:39 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Sep 2017 19:39:38 +0000 (28 19:39 +0000)
treeb86cb1ba622a88cf4a14e1fd0e4b03bc38df3be7
parent153f22fa0edd3ff66c8a52be3870396db9262a31
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253265 138bc75d-0d04-0410-961f-82ee72b054a4
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