[clang] [Matrix][Clang][HLSL] Move MaxMatrixDimension to a LangOpt (PR #163307)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 15 18:15:08 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 origin/main HEAD --extensions cpp,h -- clang/include/clang/AST/TypeBase.h clang/lib/AST/ASTContext.cpp clang/lib/Basic/LangOptions.cpp clang/lib/Sema/HLSLExternalSemaSource.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaType.cpp clang/test/SemaCXX/matrix-type.cpp clang/unittests/Frontend/CompilerInvocationTest.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/Sema/HLSLExternalSemaSource.cpp b/clang/lib/Sema/HLSLExternalSemaSource.cpp
index a2b5d369a..f28a03720 100644
--- a/clang/lib/Sema/HLSLExternalSemaSource.cpp
+++ b/clang/lib/Sema/HLSLExternalSemaSource.cpp
@@ -160,7 +160,7 @@ void HLSLExternalSemaSource::defineHLSLMatrixAlias() {
TemplateParams.emplace_back(ColsParam);
const unsigned MaxMatDim = SemaPtr->getLangOpts().MaxMatrixDimension;
-
+
auto *MaxRow = IntegerLiteral::Create(
AST, llvm::APInt(AST.getIntWidth(AST.IntTy), MaxMatDim), AST.IntTy,
SourceLocation());
``````````
</details>
https://github.com/llvm/llvm-project/pull/163307
More information about the cfe-commits
mailing list