[clang] [HLSL][Matrix] Add implicit type conversions for constant matrix types (PR #181939)
Deric C. via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 09:29:09 PST 2026
================
@@ -238,9 +238,10 @@ 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 -1{{implicit conversion truncates matrix: 'float2x3' (aka 'matrix<float, 2, 3>') to 'matrix<int, 2, 2>'}}
----------------
Icohedron wrote:
This change makes it consistent with the other cases. For example on https://github.com/llvm/llvm-project/pull/181939/changes#diff-85c57039fcb2e904d052187a8af7bee1277f00c1d5aadb2245c431dc07fea0dfR252 the expected warning is
```
// expected-warning at -1{{implicit conversion truncates matrix: 'float2x3' (aka 'matrix<float, 2, 3>') to 'matrix<float, 2, 2>'}}
```
which also does not have the "syntactic sugar for hlsl" for `float2x2`. It only mentions 'matrix<float, 2, 2>'.
https://github.com/llvm/llvm-project/pull/181939
More information about the cfe-commits
mailing list