|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
4f4340ee |
| 14-Jan-2022 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[NFC] [Coroutines] Refactor implementation in checkFinalSuspendNoThrow
Now when we are checking if the expression `co_await promise.final_suspend()` is not throw, we would check unconditionally for
[NFC] [Coroutines] Refactor implementation in checkFinalSuspendNoThrow
Now when we are checking if the expression `co_await promise.final_suspend()` is not throw, we would check unconditionally for its child expressions recursively. It takes unnecessary time. And the compiler would complains if the implementation in final_suspend() may throw even if the higher level function signature marked noexcept already.
This fixes bug48453 too.
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
| #
ec117158 |
| 04-Nov-2021 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[Coroutines] [Frontend] Lookup in std namespace first
Now in libcxx and clang, all the coroutine components are defined in std::experimental namespace. And now the coroutine TS is merged into C++20.
[Coroutines] [Frontend] Lookup in std namespace first
Now in libcxx and clang, all the coroutine components are defined in std::experimental namespace. And now the coroutine TS is merged into C++20. So in the working draft like N4892, we could find the coroutine components is defined in std namespace instead of std::experimental namespace. And the coroutine support in clang seems to be relatively stable. So I think it may be suitable to move the coroutine component into the experiment namespace now.
This patch would make clang lookup coroutine_traits in std namespace first. For the compatibility consideration, clang would lookup in std::experimental namespace if it can't find definitions in std namespace. So the existing codes wouldn't be break after update compiler.
And in case the compiler found std::coroutine_traits and std::experimental::coroutine_traits at the same time, it would emit an error for it.
The support for looking up std::experimental::coroutine_traits would be removed in Clang16.
Reviewed By: lxfind, Quuxplusone
Differential Revision: https://reviews.llvm.org/D108696
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
79f8b5f0 |
| 03-Sep-2021 |
Louis Dionne <ldionne.2@gmail.com> |
Revert "[Coroutines] [Clang] Look up coroutine component in std namespace first"
This reverts commit 2fbd254aa46b, which broke the libc++ CI. I'm reverting to get things stable again until we've fig
Revert "[Coroutines] [Clang] Look up coroutine component in std namespace first"
This reverts commit 2fbd254aa46b, which broke the libc++ CI. I'm reverting to get things stable again until we've figured out a way forward.
Differential Revision: https://reviews.llvm.org/D108696
show more ...
|
| #
2fbd254a |
| 03-Sep-2021 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[Coroutines] [Clang] Look up coroutine component in std namespace first
Summary: Now in libcxx and clang, all the coroutine components are defined in std::experimental namespace. And now the corouti
[Coroutines] [Clang] Look up coroutine component in std namespace first
Summary: Now in libcxx and clang, all the coroutine components are defined in std::experimental namespace. And now the coroutine TS is merged into C++20. So in the working draft like N4892, we could find the coroutine components is defined in std namespace instead of std::experimental namespace. And the coroutine support in clang seems to be relatively stable. So I think it may be suitable to move the coroutine component into the experiment namespace now.
But move the coroutine component into the std namespace may be an break change. So I planned to split this change into two patch. One in clang and other in libcxx.
This patch would make clang lookup coroutine_traits in std namespace first. For the compatibility consideration, clang would lookup in std::experimental namespace if it can't find definitions in std namespace and emit a warning in this case. So the existing codes wouldn't be break after update compiler.
Test Plan: check-clang, check-libcxx
Reviewed By: lxfind
Differential Revision: https://reviews.llvm.org/D108696
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
| #
c25acec8 |
| 22-Jun-2020 |
Xun Li <xun@fb.com> |
[Coroutines] Handle dependent promise types for final_suspend non-throw check
Summary: Check that the co_await promise.final_suspend() does not potentially throw again after we have resolved depende
[Coroutines] Handle dependent promise types for final_suspend non-throw check
Summary: Check that the co_await promise.final_suspend() does not potentially throw again after we have resolved dependent types. This takes care of the cases where promises types are templated. Added test cases for this scenario and confirmed that the checks happen now. Also run libcxx tests locally to make sure all tests pass.
Reviewers: Benabik, lewissbaker, junparser, modocache
Reviewed By: modocache
Subscribers: modocache, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82332
show more ...
|
| #
516803dc |
| 15-Jun-2020 |
Xun Li <xun@fb.com> |
[Coroutines] Ensure co_await promise.final_suspend() does not throw
Summary: This patch addresses https://bugs.llvm.org/show_bug.cgi?id=46256 The spec of coroutine requires that the expression co_a
[Coroutines] Ensure co_await promise.final_suspend() does not throw
Summary: This patch addresses https://bugs.llvm.org/show_bug.cgi?id=46256 The spec of coroutine requires that the expression co_await promise.final_suspend() shall not be potentially-throwing. To check this, we recursively look at every call (including Call, MemberCall, OperatorCall and Constructor) in all code generated by the final suspend, and ensure that the callees are declared with noexcept. We also look at any returned data type that requires explicit destruction, and check their destructors for noexcept.
This patch does not check declarations with dependent types yet, which will be done in future patches.
Updated all tests to add noexcept to the required functions, and added a dedicated test for this patch.
This patch might start to cause existing codebase fail to compile because most people may not have been strict in tagging all the related functions noexcept.
Reviewers: lewissbaker, modocache, junparser
Reviewed By: modocache
Subscribers: arphaman, junparser, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82029
show more ...
|