[PATCH] D68845: Don't emit unwanted constructor calls in co_return statements

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 19:19:32 PDT 2019


aaronpuchert marked 15 inline comments as done.
aaronpuchert added a comment.

Given the complexities of this implementation, I'm beginning to doubt whether implicit moves make sense for `co_return` at all. Since there can never be any kind of RVO, why not always require an explicit `std::move`? Implicit moves on `return` were introduced because an explicit move would inhibit NRVO, and without move there wouldn't be a graceful fallback for implementations that don't have NRVO.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68845/new/

https://reviews.llvm.org/D68845





More information about the cfe-commits mailing list