This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH to nested lambda capture


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;
 	    }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]