// RUN: %clang_cc1 %s -std=c++20 -fsyntax-only -verify
;
;
resumable
// NOTE: Although the argument here is a rvalue reference and the corresponding
// allocation function in resumable::promise_type have lvalue references, it looks
// the signature of f2 is invalid. But according to [dcl.fct.def.coroutine]p4:
//
// In the following, pi is an lvalue of type Pi, where p1 denotes the object
// parameter and pi+1 denotes the ith non-object function parameter for a
// non-static member function.
//
// And [dcl.fct.def.coroutine]p9.1
//
// overload resolution is performed on a function call created by assembling an argument list.
// The first argument is the amount of space requested, and has type std::size_t.
// The lvalues p1…pn are the succeeding arguments.
//
// So the actual type passed to resumable::promise_type::operator new is lvalue
// Allocator. It is allowed to convert a lvalue to a lvalue reference. So the
// following one is valid.
resumable
resumable
resumable
resumable
resumable
;
;
;
resumable2