2009-10-23 Jason Merrill <jason@redhat.com>
+ * semantics.c (lambda_expr_this_capture): Use thisify_lambda_field.
+
* semantics.c (outer_lambda_capture_p): New fn.
(thisify_lambda_field): Factor out...
(add_default_capture): ...from here.
{
/* 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;
}