[PATCH] D88295: [Sema] Fix volatile check when test if a return object can be implicitly move

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 30 13:52:58 PDT 2020


Quuxplusone added a comment.

> So, how about we add another `CES` flag

As the original author of `CES_AsIfByStdMove`, I am opposed to any attempt to complicate this patch. My medium-term goal, now that P1155 <https://reviews.llvm.org/P1155> has been adopted, is to //eliminate// the complexity around `-Wreturn-std-move` diagnostics. I want to be able to say, "This stuff got fixed in the paper standard and now Clang doesn't need to diagnose it anymore."

If we want to do `CES` correctly, I think we should make One Big Patch that supports implicit move for `co_return`, and support P0527 "implicitly move from rvalue references," and supports the P2025 <https://reviews.llvm.org/P2025> "guaranteed NRVO" optimizations while we're at it. I encouraged Yang to split out this tiny bugfix into a separate patch precisely //because// it is a tiny bugfix. I would push it right now if I had permission to.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88295



More information about the cfe-commits mailing list