re PR c++/51494 (Legal program rejection - capturing "this" when using static method...
authorJason Merrill <jason@redhat.com>
Fri, 8 Mar 2013 16:03:48 +0000 (11:03 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 8 Mar 2013 16:03:48 +0000 (11:03 -0500)
commit0ef811d71e69f732716e92c81d157aa1c88e7e22
tree625454b1e858550bbc542f3e02625cff0632d3a5
parente48243d8403c76cd248a97c94d138936d856d543
re PR c++/51494 (Legal program rejection - capturing "this" when using static method inside lambda)

PR c++/51494
PR c++/51884
PR c++/56222
* tree.c (maybe_dummy_object): Don't capture 'this'.
* semantics.c (maybe_resolve_dummy): New.
(finish_non_static_data_member): Use it.
(finish_qualified_id_expr): Don't test is_dummy_object.
* cp-tree.h: Declare maybe_resolve_dummy.
* call.c (build_new_method_call_1): Use it.

From-SVN: r196549
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this11.C [new file with mode: 0644]