[clang] [HLSL] Modify the Matrix orientation to be AST based instead of Attribute (PR #214001)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 11:54: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 cpp,h -- clang/include/clang/AST/ASTContext.h clang/include/clang/AST/MatrixUtils.h clang/include/clang/AST/TypeBase.h clang/include/clang/Sema/Overload.h clang/lib/AST/ASTContext.cpp clang/lib/AST/ASTImporter.cpp clang/lib/AST/ItaniumMangle.cpp clang/lib/AST/MicrosoftMangle.cpp clang/lib/AST/Type.cpp clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaExprCXX.cpp clang/lib/Sema/SemaHLSL.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/lib/Sema/SemaType.cpp clang/lib/Sema/TreeTransform.h --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/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 760f1b71a..e666fde5e 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -13780,8 +13780,8 @@ QualType Sema::CheckMatrixElementwiseOperands(ExprResult &LHS, ExprResult &RHS,
if (Context.hasSameType(LHSType, RHSType))
return Context.getCommonSugaredType(LHSType, RHSType);
- if (const auto *LHSConstantMat = dyn_cast_or_null<ConstantMatrixType>(
- LHSMatType)) {
+ if (const auto *LHSConstantMat =
+ dyn_cast_or_null<ConstantMatrixType>(LHSMatType)) {
const auto *RHSConstantMat =
dyn_cast_or_null<ConstantMatrixType>(RHSMatType);
if (RHSConstantMat &&
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 740cb974d..5e87c64ea 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -173,7 +173,7 @@ ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind) {
ICR_Conversion,
ICR_HLSL_Scalar_Widening,
ICR_HLSL_Scalar_Widening,
- ICR_Exact_Match,
+ ICR_Exact_Match,
};
static_assert(std::size(Rank) == (int)ICK_Num_Conversion_Kinds);
return Rank[(int)Kind];
@@ -238,7 +238,7 @@ static const char *GetImplicitConversionName(ImplicitConversionKind Kind) {
"Non-decaying array conversion",
"HLSL vector splat",
"HLSL matrix splat",
- "HLSL matrix layout conversion",
+ "HLSL matrix layout conversion",
};
static_assert(std::size(Name) == (int)ICK_Num_Conversion_Kinds);
return Name[Kind];
``````````
</details>
https://github.com/llvm/llvm-project/pull/214001
More information about the cfe-commits
mailing list