[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 333707. mizvekov added a comment. Cleaned up implementation, not WIP anymore, ready for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Data points: I've run this new Clang in `-std=c++2b` mode over my employer's (medium-sized, not too crazy) C++17 codebase, and also built Clang with Clang. Neither one required any source-code changes to deal with p2266. (The C++17 codebase did need about 10 identic

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-24 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 333158. mizvekov added a comment. Rebased on top of D99225 , running on a bunch of extra tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.o

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-23 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. Splitting off the test changes into: https://reviews.llvm.org/D99225 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 ___ cfe-commits mai

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332187. mizvekov added a comment. small cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaCoroutine.cpp

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332186. mizvekov added a comment. small cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp c

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332184. mizvekov added a comment. Changed: - Implemented co_return as per Aaron's suggestion. - Imported coroutine tests from D68845 . - Test tags shortened: cxxYY_cxxZZ means every version from YY to ZZ, instead of cxxAA_BB

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D99005#2640415 , @mizvekov wrote: > We should expect the test above to work, by binding value to the rvalue > reference in task's promise, right? Precisely, we don't want to do any initialization at all. (There will be an

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2640121 , @aaronpuchert wrote: > With my previous comment I meant that it's better if you leave out the > `co_return` bits for now because it's wrong anyway. We can't use > `PerformMoveOrCopyInitialization`. It would

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2639977 , @Quuxplusone wrote: > Conspicuously missing: tests for `decltype(auto)` return types, tests for > `co_return`. Though the first comment warns you that this is a work in progress and I just didn't get around

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. With my previous comment I meant that it's better if you leave out the `co_return` bits for now because it's wrong anyway. We can't use `PerformMoveOrCopyInitialization`. It would just generate merge conflicts. I'll probably just update my change once the committee

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-20 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Conspicuously missing: tests for `decltype(auto)` return types, tests for `co_return`. Personally I'd rather see these new p2266-related tests go in a separate test file, not appended to the existing file, so as to keep each test file relatively simpler and shorter

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332140. mizvekov added a comment. - Removed special flag, now is enabled on -std=c++2b - Always enabled for coroutines - Ran test suite - Some relevant test files updated to also run c++2b - Some new tests added Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2639501 , @aaronpuchert wrote: > For coroutines I have D68845 . The current > code is wrong, and not trivial to fix. We have never properly implemented > P1825

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-20 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. For coroutines I have D68845 . The current code is wrong, and not trivial to fix. We have never properly implemented P1825 and will probably just go with P2266 uncond

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-19 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. Herald added subscribers: jansvoboda11, dexonsmith, lxfind, dang. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. WIP, not yet ready for review. Small sample of things wrong with this patch: - Have