Fix https://github.com/llvm/llvm-project/issues/56532
Effectively, this reverts behavior introduced in https://reviews.llvm.org/D117087,
which did two things:
- Change delayed to early conversion of return object.
- Introduced RVO possibilities because of early conversion.
This patches fixes (1) and removes (2). I already worked on a follow up for (2)
in a separated patch. I believe it's important to split these two because if the RVO
causes any problems we can explore reverting (2) while maintaining (1).
Notes on some testcase changes:
- pr59221.cpp changed to -O1 so we can check that the front-end honors the value checked for. Sounds like -O3 without RVO is more likely to work with LLVM optimizations...
- Comment out delete members coroutine-no-move-ctor.cpp since behavior now requires copies again.
Maybe we can delete this.