EricWF updated this revision to Diff 102472.
EricWF added a comment.
- Remove changes to how `CoroutineSuspendExpr`s `ExprValueType` is calculated.
They were incorrect. However this means that Clang still fails to compile
`co_await` and `co_yield` expressions where `await_resume` returns an lval
EricWF added inline comments.
Comment at: include/clang/AST/ExprCXX.h:4136
+ : Expr(SC, Resume->getType(),
+ (Resume->getType()->isLValueReferenceType() ? VK_LValue :
+ Resume->getType()->isRValueReferenceType() ? VK_XValue :
@rsmith
GorNishanov accepted this revision.
GorNishanov added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D34021
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
EricWF added inline comments.
Comment at: test/SemaCXX/coawait_range_for.cpp:133
+
+struct ForLoopAwaiterCoawaitLookup {
+ struct promise_type {
This test is incorrect WRT ADL lookup.
https://reviews.llvm.org/D34021
EricWF updated this revision to Diff 101862.
EricWF added a comment.
- Fix value category of `co_await`/`co_yield` expression. ie use the return
type of the resume expression to determine the value category.
@rsmith Should the `CoroutineSuspendExpr` constructor be using
`getCallReturnType()` to
EricWF updated this revision to Diff 101858.
https://reviews.llvm.org/D34021
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaCoroutine.cpp
lib/Sema/SemaStmt.cpp
test/SemaCXX/coawait_range_for.cpp
Index: test/SemaCXX/coawait_range_for.cpp
EricWF updated this revision to Diff 101857.
EricWF added a comment.
- More test cleanup. Sorry for the noise.
https://reviews.llvm.org/D34021
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaCoroutine.cpp
lib/Sema/SemaStmt.cpp
test/SemaCXX/coawait_range_for.cpp
Index: test/SemaCXX/coawai
EricWF updated this revision to Diff 101854.
EricWF added a comment.
- Fix clang-format nonsense in tests.
https://reviews.llvm.org/D34021
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaCoroutine.cpp
lib/Sema/SemaStmt.cpp
test/SemaCXX/coawait_range_for.cpp
Index: test/SemaCXX/coawait_ra
EricWF updated this revision to Diff 101853.
EricWF added a comment.
- Add FIXME comments for incorrect use of `getCurScope()` after initial parse.
https://reviews.llvm.org/D34021
Files:
include/clang/Sema/Sema.h
lib/Sema/SemaCoroutine.cpp
lib/Sema/SemaStmt.cpp
test/SemaCXX/coawait_rang
EricWF created this revision.
Currently we build the co_await expressions on the wrong implicit statements of
the implicit ranged for; Specifically we build the co_await expression wrapping
the range declaration, but it should wrap the begin expression.
This patch fixes co_await on range for.
10 matches
Mail list logo