[clang] [HLSL] Make it possible to assign an array from a cbuffer (PR #134174)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 2 16:26:41 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaOverload.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 9e9229ff5..9ab39a824 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -4420,8 +4420,9 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType,
const ArrayParameterType *APT = cast<ArrayParameterType>(FromType);
FromType = APT->getConstantArrayType(Context);
}
- From = ImpCastExprToType(From, FromType, CK_HLSLArrayRValue, VK_PRValue,
- /*BasePath=*/nullptr, CCK).get();
+ From = ImpCastExprToType(From, FromType, CK_HLSLArrayRValue, VK_PRValue,
+ /*BasePath=*/nullptr, CCK)
+ .get();
break;
case ICK_Function_To_Pointer:
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 950114046..d282fe50e 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -2276,7 +2276,7 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType,
SCS.First = ICK_HLSL_Array_RValue;
if (FromType.getCanonicalType().getUnqualifiedType() !=
- ToType.getCanonicalType().getUnqualifiedType())
+ ToType.getCanonicalType().getUnqualifiedType())
return false;
SCS.setAllToTypes(ToType);
``````````
</details>
https://github.com/llvm/llvm-project/pull/134174
More information about the cfe-commits
mailing list