- /* If decl is a non-capture field and object has a lambda type,
- then we have a reference to a member of 'this' from a
- lambda inside a non-static member function, and we must get to decl
- through the 'this' capture. If decl is not a member of that object,
- either, then its access will still fail later. */
- if (LAMBDA_TYPE_P (TREE_TYPE (object))
- && !LAMBDA_TYPE_P (DECL_CONTEXT (decl)))
- object = cp_build_indirect_ref (lambda_expr_this_capture
- (CLASSTYPE_LAMBDA_EXPR
- (TREE_TYPE (object))),
- RO_NULL,
- /*complain=*/tf_warning_or_error);
-