[clang] Reset PostAllocaInsertPt when the AllocaInsertPt is changed in clang::CodeGenFunction (PR #98668)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 11:25:11 PDT 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 6cea40400df542a1a4a6d35b45cbe3367f2c32b7 db22886b15f6bcab77b41846742f07639544bbe7 --extensions h -- clang/lib/CodeGen/CodeGenFunction.h
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 2955949cba..f0c6969b7e 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -2004,7 +2004,6 @@ public:
         CGF.ReturnBlock = CGF.getJumpDestInCurrentScope(&RetBB);
 
         CGF.PostAllocaInsertPt = nullptr;
-
       }
 
       ~OutlinedRegionBodyRAII() {
@@ -2012,7 +2011,6 @@ public:
         CGF.ReturnBlock = OldReturnBlock;
 
         CGF.PostAllocaInsertPt = nullptr;
-
       }
     };
 
@@ -2048,8 +2046,7 @@ public:
         (void)CGF.getJumpDestInCurrentScope(&FiniBB);
       }
 
-      ~InlinedRegionBodyRAII()
-      {
+      ~InlinedRegionBodyRAII() {
         CGF.AllocaInsertPt = OldAllocaIP;
         CGF.PostAllocaInsertPt = nullptr;
       }

``````````

</details>


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


More information about the cfe-commits mailing list