[clang] [clang] Update diagnostics to include matrices as accepted types (PR #201237)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 16:51:30 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 c,cpp -- clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaHLSL.cpp clang/lib/Sema/SemaSPIRV.cpp clang/test/Sema/aarch64-sve-vector-exp-ops.c clang/test/Sema/aarch64-sve-vector-log-ops.c clang/test/Sema/aarch64-sve-vector-pow-ops.c clang/test/Sema/aarch64-sve-vector-trig-ops.c clang/test/Sema/builtins-elementwise-math.c clang/test/Sema/riscv-rvv-vector-exp-ops.c clang/test/Sema/riscv-rvv-vector-log-ops.c clang/test/Sema/riscv-rvv-vector-trig-ops.c clang/test/Sema/riscv-sve-vector-pow-ops.c clang/test/SemaSPIRV/BuiltIns/ddx-errors.c clang/test/SemaSPIRV/BuiltIns/ddy-errors.c clang/test/SemaSPIRV/BuiltIns/faceforward-errors.c clang/test/SemaSPIRV/BuiltIns/fwidth-errors.c clang/test/SemaSPIRV/BuiltIns/smoothstep-errors.c --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/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 0ececb40d..04c38b6d9 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -3301,8 +3301,8 @@ static bool CheckFloatOrHalfRepresentation(Sema *S, SourceLocation Loc,
if (!BaseType->isHalfType() && !BaseType->isFloat32Type())
return S->Diag(Loc, diag::err_builtin_invalid_arg_type)
- << ArgOrdinal << /* scalar, vector, or matrix */ 6
- << /* no int */ 0 << /* half or float */ 2 << PassedType;
+ << ArgOrdinal << /* scalar, vector, or matrix */ 6 << /* no int */ 0
+ << /* half or float */ 2 << PassedType;
return false;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/201237
More information about the cfe-commits
mailing list