Capture adjustments for P0588R1.
authorJason Merrill <jason@redhat.com>
Mon, 13 Nov 2017 22:34:38 +0000 (17:34 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 13 Nov 2017 22:34:38 +0000 (17:34 -0500)
commitc1051bf7d8c99d056c6ae3353eb2b61751293d2f
treefd734eba6bb7c4373c5a32b46fdb8e5256e42335
parent04757a2a49bd21c71af386a64591f77c165a0d93
Capture adjustments for P0588R1.

* semantics.c (process_outer_var_ref): Capture variables when
they are named; complain about non-capture uses when odr-used.
* expr.c (mark_use): Rvalue use looks through capture proxy.
* constexpr.c (potential_constant_expression_1): Improve error about
use of captured variable.
* lambda.c (need_generic_capture, dependent_capture_r)
(do_dependent_capture, processing_nonlambda_template): Remove.
* call.c (build_this): Remove uses of the above.
* decl.c (cp_finish_decl): Likewise.
* semantics.c (maybe_cleanup_point_expr)
(maybe_cleanup_point_expr_void, finish_goto_stmt)
(maybe_convert_cond): Likewise.
* typeck.c (check_return_expr): Likewise.

From-SVN: r254713
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/expr.c
gcc/cp/lambda.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/typeck.c