[all-commits] [llvm/llvm-project] 1fad78: [Clang][Coroutines] Properly emit EH code for init...
Yuxuan Chen via All-commits
all-commits at lists.llvm.org
Tue Nov 21 21:21:42 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1fad78b123d20db675d339053e4265aceb07c4af
https://github.com/llvm/llvm-project/commit/1fad78b123d20db675d339053e4265aceb07c4af
Author: Yuxuan Chen <yuxuanchen1997 at outlook.com>
Date: 2023-11-21 (Tue, 21 Nov 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/CodeGen/CGCoroutine.cpp
A clang/test/CodeGenCoroutines/coro-init-await-nontrivial-return.cpp
Log Message:
-----------
[Clang][Coroutines] Properly emit EH code for initial suspend `await_resume` (#73073)
This change aims to fix an ICE in issue
https://github.com/llvm/llvm-project/issues/63803
The crash happens in `ExitCXXTryStmt` because `EmitAnyExpr()` adds
additional cleanup to the `EHScopeStack`. This messes up the assumption
in `ExitCXXTryStmt` that the top of the stack should be a
`EHCatchScope`.
However, since we never read a value returned from `await_resume()` of
an init suspend, we can skip the part that builds this `RValue`.
The code here may not be in the best shape. There's another bug that
`memberCallExpressionCanThrow` doesn't work on the current Expr due to
type mismatch. I am preparing a separate PR to address it plus some
refactoring might be beneficial.
More information about the All-commits
mailing list