[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Please have a look at D68845 . This should address the issues that we discussed. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51741/new/ https://reviews.llvm.org/D51741 ___

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. @Quuxplusone Thanks for your very helpful comments! > In which case, this patch (D51741 ) itself > fixed this FIXME at least partly, and maybe completely. Maybe this patch > should have removed or amended the FIXME, rather than just

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: cfe/trunk/lib/Sema/SemaCoroutine.cpp:857-859 // FIXME: If the operand is a reference to a variable that's about to go out // of scope, we should treat the operand as an xvalue for this overload // resolution. ---

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-09 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D51741#1702038 , @Quuxplusone wrote: > This patch is heavily heavily merge-conflicted by P1825 > . Just to be clear, this change is pretty old: it's a

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D51741#1701757 , @aaronpuchert wrote: > This change breaks the following code that worked before: > > task f(MoveOnly &value) { > co_return value; > } > This patch is heavily heavily merge-conflicted by P1825

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-09 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a subscriber: lewissbaker. modocache added a comment. > Is that maybe intentional, and is the code not intended to compile? It looks like it should work to me, but maybe @lewissbaker or @GorNishanov can answer definitively. Comment at: cfe/trunk/lib/Sema/SemaC

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2019-10-09 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Herald added a project: LLVM. This change breaks the following code that worked before: task f(MoveOnly &value) { co_return value; } The error message is: clang/test/SemaCXX/coroutine-rvo.cpp:60:13: error: call to deleted constructor of 'MoveOnly' co

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-10-07 Thread Brian Gesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343949: [coro]Pass rvalue reference for named local variable to return_value (authored by modocache, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.or

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-10-04 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. @modocache I do need someone to land this for me! Take it away! Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-10-04 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 updated this revision to Diff 168380. tks2103 added a comment. comply with clang-format Repository: rC Clang https://reviews.llvm.org/D51741 Files: lib/Sema/SemaCoroutine.cpp test/SemaCXX/coroutine-rvo.cpp Index: test/SemaCXX/coroutine-rvo.cpp ==

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-10-01 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. LGTM! Thank you for doing this. Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-26 Thread Brian Gesiak via Phabricator via cfe-commits
modocache accepted this revision. modocache added a comment. This revision is now accepted and ready to land. This is great, thanks! Sorry for letting it languish. I defer to @GorNishanov, but I don't see why this couldn't go in now and if there're any edge cases I'm missing we can address those

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-25 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. ping @GorNishanov SAVE ME GOR! YOU'RE MY ONLY HOPE! Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-14 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. ping @GorNishanov Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-10 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. ping @GorNishanov Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-06 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 updated this revision to Diff 164265. tks2103 added a comment. get NRVOCandidate to determine if we should try to move return var Repository: rC Clang https://reviews.llvm.org/D51741 Files: lib/Sema/SemaCoroutine.cpp test/SemaCXX/coroutine-rvo.cpp Index: test/SemaCXX/coroutine-

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-06 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. also fails https://github.com/llvm-mirror/clang/blob/master/test/SemaCXX/coroutines.cpp#L494 with `address of overloaded function 'g' does not match required type ''` also fails https://github.com/llvm-mirror/clang/blob/master/test/SemaCXX/coroutines.cpp#L505 with `ad

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-06 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 added a comment. currently changes the behavior for a few cases: something like void coro() { co_return {4}; } throws `illegal initializer type 'void'` Repository: rC Clang https://reviews.llvm.org/D51741 ___ cfe-commits mailin

[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

2018-09-06 Thread Tanoy Sinha via Phabricator via cfe-commits
tks2103 created this revision. tks2103 added reviewers: modocache, GorNishanov. Herald added a subscriber: cfe-commits. tks2103 edited the summary of this revision. Addressing https://bugs.llvm.org/show_bug.cgi?id=37265. Implements [class.copy]/33 of coroutines TS When the criteria for elision o