[all-commits] [llvm/llvm-project] 1d5bd2: [Matrix][Clang][HLSL] Move MaxMatrixDimension to a...

Farzon Lotfi via All-commits all-commits at lists.llvm.org
Thu Oct 16 06:02:15 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d5bd289062748c89bb9f3f88d0f804972185e93
      https://github.com/llvm/llvm-project/commit/1d5bd289062748c89bb9f3f88d0f804972185e93
  Author: Farzon Lotfi <farzonlotfi at microsoft.com>
  Date:   2025-10-16 (Thu, 16 Oct 2025)

  Changed paths:
    M clang/include/clang/AST/TypeBase.h
    M clang/include/clang/Basic/LangOptions.def
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/Basic/LangOptions.cpp
    M clang/lib/Sema/HLSLExternalSemaSource.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/SemaCXX/matrix-type.cpp
    M clang/test/SemaHLSL/BuiltIns/matrix-basic_types-errors.hlsl
    M clang/unittests/Frontend/CompilerInvocationTest.cpp

  Log Message:
  -----------
  [Matrix][Clang][HLSL] Move MaxMatrixDimension to a LangOpt (#163307)

fixes #160190
fixes #116710

This change just makes MaxMatrixDimension configurable by language mode.
It was previously introduced in
https://github.com/llvm/llvm-project/commit/94b43118e2203fed8ca0377ae762c08189aa6f3d
when there was not a need to make dimensions configurable.

Current testing to this effect exists in:
- clang/test/Sema/matrix-type-builtins.c
- clang/test/SemaCXX/matrix-type-builtins.cpp
- clang/test/SemaHLSL/BuiltIns/matrix-basic_types-errors.hlsl

New Tests to confirm configurability by language mode:
- clang/unittests/Frontend/CompilerInvocationTest.cpp

I considered adding a driver flag to
`clang/include/clang/Driver/Options.td` but HLSL matrix max dim is
always 4 so we don't need this configurable beyond that size for our use
case.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list