llvm-capstone/clang/test/CodeGenCoroutines
Yuxuan Chen 4a294b5806
[Clang] CGCoroutines skip emitting try block for value returning noexcept init await_resume calls (#73160)
Previously we were not properly skipping the generation of the `try { }`
block around the `init_suspend.await_resume()` if the `await_resume` is
not returning void. The reason being that the resume expression was
wrapped in a `CXXBindTemporaryExpr` and the first dyn_cast failed,
silently ignoring the noexcept. This only mattered for `init_suspend`
because it had its own try block.

This patch changes to first extract the sub expression when we see a
`CXXBindTemporaryExpr`. Then perform the same logic to check for
`noexcept`.

Another version of this patch also wanted to assert the second step by
`cast<CXXMemberCallExpr>` and as far as I understand it should be a
valid assumption. I can change to that if upstream prefers.
2023-11-28 19:04:29 -08:00
..
Inputs
coro-aligned-alloc-2.cpp Revert "[clang] Enable sized deallocation by default in C++14 onwards" 2023-08-29 09:36:59 -04:00
coro-aligned-alloc.cpp Revert "[clang] Enable sized deallocation by default in C++14 onwards" 2023-08-29 09:36:59 -04:00
coro-alloc-2.cpp
coro-alloc.cpp Revert "[clang] Enable sized deallocation by default in C++14 onwards" 2023-08-29 09:36:59 -04:00
coro-always-inline.cpp
coro-attributes.cpp
coro-await-domination.cpp
coro-await-resume-eh.cpp
coro-await.cpp
coro-awaiter-noinline-suspend.cpp Recommit [C++20] [Coroutines] Mark await_suspend as noinline if the awaiter is not empty 2023-08-28 17:07:30 +08:00
coro-builtins-err.c
coro-builtins.c Extend retcon.once coroutines lowering to optionally produce a normal result (#66333) 2023-09-15 09:54:38 -07:00
coro-cleanup.cpp [ItaniumCXXABI] Add -fassume-nothrow-exception-dtor to assume that all exception objects' destructors are non-throwing 2023-11-05 00:39:38 -07:00
coro-dealloc.cpp Revert "[clang] Enable sized deallocation by default in C++14 onwards" 2023-08-29 09:36:59 -04:00
coro-dest-slot.cpp
coro-destructor-of-final_suspend.cpp
coro-dwarf.cpp
coro-eh-cleanup.cpp Extend retcon.once coroutines lowering to optionally produce a normal result (#66333) 2023-09-15 09:54:38 -07:00
coro-elide.cpp
coro-function-try-block.cpp
coro-gro2.cpp
coro-gro.cpp [Clang][LLVM][Coroutines] Prevent __coro_gro from outliving __promise (#66706) 2023-09-21 22:52:05 -07:00
coro-halo.cpp [Coroutines] [CoroElide] Don't think exceptional terminator don't leak coro handle unconditionally any more 2023-08-23 16:51:53 +08:00
coro-init-await-nontrivial-return.cpp [Clang] CGCoroutines skip emitting try block for value returning noexcept init await_resume calls (#73160) 2023-11-28 19:04:29 -08:00
coro-lambda.cpp
coro-newpm-pipeline.cpp
coro-only-destroy-when-complete.cpp [Coroutines] Introduce [[clang::coro_only_destroy_when_complete]] (#71014) 2023-11-09 14:42:07 +08:00
coro-params.cpp [clang] Convert a few tests to opaque pointers 2023-05-14 21:00:15 +03:00
coro-promise-dtor.cpp
coro-ret-void.cpp
coro-return-voidtype-initlist.cpp
coro-return.cpp
coro-symmetric-transfer-01.cpp
coro-symmetric-transfer-02.cpp
coro-symmetric-transfer-03.cpp
coro-unhandled-exception.cpp
microsoft-abi-operator-coawait.cpp
pr56301.cpp Recommit [C++20] [Coroutines] Mark await_suspend as noinline if the awaiter is not empty 2023-08-28 17:07:30 +08:00
pr56329.cpp
pr56919.cpp Revert "[clang] Enable sized deallocation by default in C++14 onwards" 2023-08-29 09:36:59 -04:00
pr59181.cpp Revert "Reapply: [IRGen] Emit lifetime intrinsics around temporary aggregate argument allocas" 2023-09-01 12:53:24 +02:00
pr59221.cpp
pr59723.cpp [Coroutines] [CoroElide] Don't think exceptional terminator don't leak coro handle unconditionally any more 2023-08-23 16:51:53 +08:00
pr65018.cpp [NFC] Correct the test code in pr65018 2023-08-29 11:30:47 +08:00
pr65054.cpp [Coroutines] Mark 'coroutine_handle<>::address' as always-inline 2023-08-29 14:35:27 +08:00