[clang] [Matrix][Clang][HLSL] Move MaxMatrixDimension to a LangOpt (PR #163307)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 15 17:42:00 PDT 2025


================
@@ -159,7 +159,8 @@ void HLSLExternalSemaSource::defineHLSLMatrixAlias() {
                                                   SourceLocation(), ColsParam));
   TemplateParams.emplace_back(ColsParam);
 
-  const unsigned MaxMatDim = 4;
+  const unsigned MaxMatDim = SemaPtr->getLangOpts().MaxMatrixDimension;
+  ;
----------------
llvm-beanz wrote:

Looks like a spurious `;`.

```suggestion
  const unsigned MaxMatDim = SemaPtr->getLangOpts().MaxMatrixDimension;
```

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


More information about the cfe-commits mailing list