[clang] [CIR] Implement FlattenCFG for coroutine AwaitOp, CoroBodyOp, and CoReturnOp (PR #203802)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 20:56:24 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/include/clang/CIR/MissingFeatures.h clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp clang/lib/CIR/Dialect/IR/CIRDialect.cpp clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp clang/test/CIR/CodeGenCoroutines/coro-task.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp b/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
index 207958717..c6e19c94f 100644
--- a/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
@@ -566,7 +566,7 @@ CIRGenFunction::emitCoroutineBody(const CoroutineBodyStmt &s) {
 
     // Builds `exit`: coro.end(/*unwind*/ false) followed by the actual return
     // to the caller.
-    
+
     assert(!cir::MissingFeatures::coroutineGroManager());
     auto exitBuilder = [&]() {
       cir::ConstantOp nullHandler =

``````````

</details>


https://github.com/llvm/llvm-project/pull/203802


More information about the cfe-commits mailing list