This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH to nested lambda capture
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 23 Oct 2009 13:11:08 -0700
- Subject: Re: C++ PATCH to nested lambda capture
- References: <4AE1F224.5070304@redhat.com>
One more small code reuse change:
Tested x86_64-pc-linux-gnu, applied to trunk.
commit 42952e08d6d6bd932b7c9bfd62a9e6131fa95ac9
Author: Jason Merrill <jason@redhat.com>
Date: Fri Oct 23 12:03:22 2009 -0700
* semantics.c (lambda_expr_this_capture): Use thisify_lambda_field.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 3e39f37..417c15f 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5709,10 +5709,7 @@ lambda_expr_this_capture (tree lambda)
{
/* An outer lambda has already captured 'this'. */
tree cap = LAMBDA_EXPR_THIS_CAPTURE (lambda);
- tree lthis
- = cp_build_indirect_ref (DECL_ARGUMENTS (containing_function),
- "", tf_warning_or_error);
- init = finish_non_static_data_member (cap, lthis, NULL_TREE);
+ init = thisify_lambda_field (cap);
break;
}