Make lambda conversion op and op() non-static.
commit43936711fc72dbea643334f250f055f85f398fa2
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Mar 2010 22:29:53 +0000 (23 22:29 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 23 Mar 2010 22:29:53 +0000 (23 22:29 +0000)
treefdde8455ca7ffe4a47159148d311a462aca7e170
parentd0691b8b452818c49dc5277d5a39a475fc015b87
Make lambda conversion op and op() non-static.
* semantics.c (maybe_add_lambda_conv_op): Make non-static.
Also add the thunk function returned by the conversion op.
Mark the conversion deleted if the op() is variadic.
* decl2.c (mark_used): Give helpful message about deleted conversion.
* parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
* semantics.c (finish_this_expr): Adjust.
* mangle.c (write_closure_type_name): Adjust.
* decl.c (grok_op_properties): Don't allow it.
* call.c (build_user_type_conversion_1): No static conversion ops.
(build_op_call): Or op().

* decl2.c (change_return_type): Fix 'this' quals.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157681 138bc75d-0d04-0410-961f-82ee72b054a4
14 files changed:
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/cp/mangle.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C