[PATCH] D99893: [WIP] Replace std::forward & std::move by cast expressions during Sema

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 15:01:01 PDT 2021


Quuxplusone added a comment.

No matter how it works internally, I think that (nearer the end of the process) someone should insist that you add some Clang tests to verify e.g.

  Widget&& a = static_cast<Widget&&>(Widget());  // is lifetime-extended, but
  Widget&& b = std::move(Widget());              // is not

https://godbolt.org/z/9Ka7hcode
and whatever other corner-cases people can think of. That is, these may turn into not-a-function-calls internally, but they'd better continue to behave //observably// as if they were function-calls.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99893



More information about the cfe-commits mailing list