[llvm-branch-commits] [clang] [HLSL][Matrix] Add implicit matrix floating-point conversion checks (PR #179568)
Deric C. via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 4 11:46:11 PST 2026
================
@@ -239,6 +239,7 @@ void matOrVec3(float4x4 F) {}
export void Case8(float2x3 f23, float4x4 f44, float3x3 f33, float3x2 f32) {
int2x2 i22 = f23;
// expected-warning at -1{{implicit conversion truncates matrix: 'float2x3' (aka 'matrix<float, 2, 3>') to 'int2x2' (aka 'matrix<int, 2, 2>')}}
+ // expected-warning at -2{{implicit conversion turns floating-point number into integer: 'float2x3' (aka 'matrix<float, 2, 3>') to 'int2x2' (aka 'matrix<int, 2, 2>')}}
----------------
Icohedron wrote:
The existing analogous tests for vector and scalars do not exercise int16 types.
So if we want to exercise warnings for int16 then that should be done in a separate PR for vectors and scalars as well.
https://github.com/llvm/llvm-project/pull/179568
More information about the llvm-branch-commits
mailing list