[llvm] [clang][CodeGen] Handle template parameter objects with explicit address spaces (PR #69266)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 16 16:57:12 PDT 2023
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 2565f9f49b79e11ab613f125cb4a8daa87f4bab6 a4b29c2f0ca410570a97f431e647397c69536324 -- clang/test/CodeGenCXX/template-param-objects-address-space.cpp clang/lib/CodeGen/CGExpr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 784d3f7b0390..35c3fe26e26b 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -2999,9 +2999,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
if (AS != T.getAddressSpace()) {
auto TargetAS = getContext().getTargetAddressSpace(T.getAddressSpace());
auto PtrTy = ATPO.getElementType()->getPointerTo(TargetAS);
- auto ASC = getTargetHooks().performAddrSpaceCast(CGM, ATPO.getPointer(),
- AS, T.getAddressSpace(),
- PtrTy);
+ auto ASC = getTargetHooks().performAddrSpaceCast(
+ CGM, ATPO.getPointer(), AS, T.getAddressSpace(), PtrTy);
ATPO = ConstantAddress(ASC, ATPO.getElementType(), ATPO.getAlignment());
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69266
More information about the llvm-commits
mailing list