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
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
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
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
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
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
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
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
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