<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/134761>134761</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Clang is missing a warning for implicit truncation of vector types in HLSL
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          bogner
      </td>
    </tr>
</table>

<pre>
    HLSL allows implicit truncation of vector types, but DXC warns about it. Clang needs to learn this warning.
```
StructuredBuffer<int4> In : register(t0);
RWStructuredBuffer<int> Out : register(u0);

[numthreads(4,2,1)]
void main(uint GI : SV_GroupIndex) {
 Out[GI] = In[GI]; // expected-warning{{implicit truncation of vector type}}
}
```
See https://hlsl.godbolt.org/z/o7j6d7r88
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMkt-K2zwQxZ9mfDNskCU7ji98kT9f9gssFLrQ9q5Y8djRIktBGmV3-_RFaZZtS6GFQUIw54zm8OtjNJMj6qDeQL0r-sQnHzrtJ0eh0H547f5_eHzA3lr_HNHMZ2uOhpFDcseejXfoR7zQkX1Afj1TBLlFnRh3X7b43AcXsdc-MRpe4Nb2bkJHNERkj5b64JBPJl47jZsWINawFLcS60cO6cgp0LBJ40gB1NY4rkD9hweHoNYYaDKRKYBcsQDZgtqAWH_8_GdlFn5I_LsyvStz1RuXZj4F6ocIclWB3EqQ2zI31TsQ64s3A869cVlrHOP94Wr5-OnrffDpfHADvYBsEZrsmUdCvbk_QL1DUDs8uLcnqA2C3IPcI72c6cg03N2yyNpm8_fEodnlEuvb-XN8RHhiPkdQ6x9TTjbaxeQH7S0vfJhA7r-B3PvmaTk0YbUqhk4NrWr7grqyqSrRqKppi1NXKaUbofRqVbaVItVKGhsax1KTFmUzFKaTQtaiEish6rJsF0ItaypLpSvdjkNZQiVo7o1dWHuZ8-zCxJioK1XVLMvC9ppsvHIoZWYOpMxEhi733-k0RaiENZHjuwMbtld2r4J6dyPMRJxNjMZN2L-hhaMP_8IvGofZrUjBdr-GNxk-Jb04-hnkPv_hdt2dg3-iI4PcX1eKIPe3rS6d_B4AAP__qAUPiA">