[clang] Revert "[clang] remove lots of "innocuous" addrspacecasts" (PR #199685)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 07:03:37 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 h,cpp,cl,c -- clang/lib/CodeGen/ABIInfoImpl.cpp clang/lib/CodeGen/CGAtomic.cpp clang/lib/CodeGen/CGBlocks.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGCUDANV.cpp clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGClass.cpp clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/CGException.cpp clang/lib/CodeGen/CGExpr.cpp clang/lib/CodeGen/CGExprAgg.cpp clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp clang/lib/CodeGen/CGStmt.cpp clang/lib/CodeGen/CGStmtOpenMP.cpp clang/lib/CodeGen/CodeGenFunction.h clang/lib/CodeGen/MicrosoftCXXABI.cpp clang/lib/CodeGen/TargetBuiltins/ARM.cpp clang/lib/CodeGen/TargetBuiltins/X86.cpp clang/lib/CodeGen/Targets/X86.cpp clang/test/CodeGen/scoped-atomic-ops.c clang/test/CodeGenCXX/amdgcn-func-arg.cpp clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp clang/test/CodeGenOpenCL/addr-space-struct-arg.cl clang/test/CodeGenOpenCL/amdgpu-abi-struct-arg-byref.cl clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl clang/test/CodeGenOpenCL/atomic-ops.cl clang/test/CodeGenSYCL/kernel-caller-entry-point.cpp clang/test/OpenMP/amdgcn_target_device_vla.cpp clang/test/OpenMP/amdgpu_target_with_aligned_attribute.c clang/test/OpenMP/target_teams_generic_loop_codegen.cpp clang/test/OpenMP/target_teams_generic_loop_codegen_as_distribute.cpp clang/test/OpenMP/target_teams_generic_loop_codegen_as_parallel_for.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/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 1ce22df11..4590a55c0 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1558,7 +1558,7 @@ llvm::Function *CodeGenFunction::GenerateBlockFunction(
 
     CharUnits align = getContext().getDeclAlign(variable);
     Address alloca =
-      CreateMemTemp(variable->getType(), align, "block.captured-const");
+        CreateMemTemp(variable->getType(), align, "block.captured-const");
 
     Builder.CreateStore(capture.getConstant(), alloca);
 

``````````

</details>


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


More information about the cfe-commits mailing list