[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:10:24 PDT 2019


aaronpuchert updated this revision to Diff 225147.
aaronpuchert added a comment.

Add tests suggested by @Quuxplusone and add fallback to call by lvalue reference.

The latter turned out more complicated than I thought, because there seems to be no easy way to just try building a call expression without emitting errors if anything goes wrong. So essentially I look up the name myself and check if someone takes an rvalue reference.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68845

Files:
  clang/lib/Sema/SemaCoroutine.cpp
  clang/test/SemaCXX/coroutine-rvo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68845.225147.patch
Type: text/x-patch
Size: 8170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191016/0d4665da/attachment.bin>


More information about the cfe-commits mailing list