[clang-tools-extra] [clang] [llvm] [codegen] Emit cleanups for lifetime-extended temporaries when stmt-expr has control-flow (PR #80698)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 08:06:07 PST 2024


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 702664e7870c27f197dfb744a4db54aa259ce452 eeabfa285a660debf9a38bdb4a956996ee06a59b -- clang/test/CodeGenCXX/return-in-stmt-expr-cleanup.cpp clang/test/CodeGenCoroutines/coro-suspend-in-agg-init.cpp clang/lib/CodeGen/CGCleanup.cpp clang/lib/CodeGen/CodeGenFunction.h
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp
index da0528b271..39c65c0b07 100644
--- a/clang/lib/CodeGen/CGCleanup.cpp
+++ b/clang/lib/CodeGen/CGCleanup.cpp
@@ -489,7 +489,8 @@ void CodeGenFunction::PopCleanupBlocks(
 }
 
 /// Adds deferred lifetime-extended cleanups onto the EH stack.
-void CodeGenFunction::AddLifetimeExtendedCleanups(size_t OldLifetimeExtendedSize) {
+void CodeGenFunction::AddLifetimeExtendedCleanups(
+    size_t OldLifetimeExtendedSize) {
   for (size_t I = OldLifetimeExtendedSize,
               E = LifetimeExtendedCleanupStack.size();
        I != E;) {

``````````

</details>


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


More information about the cfe-commits mailing list