[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1285 + // We needed to check it, but we don't need to generate code for it. + if (!paramDecl->getIdentifier()) +continue; rsmith wrote: > EricWF wrote: > > @rsmith Is there a b

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101293. EricWF added a comment. - No longer unnamed parameters from the AST. https://reviews.llvm.org/D33797 Files: lib/Sema/CoroutineStmtBuilder.h lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransform.h test/CodeGenCoroutines/coro-params.cpp test/Sema

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1285 + // We needed to check it, but we don't need to generate code for it. + if (!paramDecl->getIdentifier()) +continue; EricWF wrote: > @rsmith Is there a better way to check

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaCoroutine.cpp:1285 + // We needed to check it, but we don't need to generate code for it. + if (!paramDecl->getIdentifier()) +continue; @rsmith Is there a better way to check if the move wou

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 101291. EricWF added a comment. - Diagnose non-moveable but otherwise unnamed parameters. - Have TreeTransform.h check if building the move params is successful. https://reviews.llvm.org/D33797 Files: lib/Sema/CoroutineStmtBuilder.h lib/Sema/SemaCoroutin

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov updated this revision to Diff 101282. GorNishanov added a comment. test updated to use %[[copy_x]] instead of %x1 https://reviews.llvm.org/D33797 Files: lib/Sema/CoroutineStmtBuilder.h lib/Sema/SemaCoroutine.cpp lib/Sema/TreeTransform.h test/CodeGenCoroutines/coro-params.cpp

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. @GorNishanov I think we should be transforming the move parameters, instead of re-building them entirely. I'll put together a different set of changes. https://reviews.llvm.org/D33797 ___ cfe-commits mailing list cfe-commits

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov added inline comments. Comment at: test/CodeGenCoroutines/coro-params.cpp:103 + // CHECK: call i8* @llvm.coro.begin + // CHECK-NEXT: call void @_ZN1AC1EOS_(%struct.A* %x1, %struct.A* dereferenceable(512) %x) + // CHECK-NEXT: call void @_ZNSt12experimental16corout

[PATCH] D33797: [coroutines] Fix rebuilding of dependent coroutine parameters

2017-06-01 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov created this revision. We were not handling correctly rebuilding of parameter and were not creating copies for them. With this checking, we will be always rebuilding parameter moves in TreeTransform's TransformCoroutineBodyStmt. https://reviews.llvm.org/D33797 Files: lib/Sema/Co