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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Move helper functions out of SemaHLSL into a common location for SemaSPIRV to use
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    While working on #122992, @inbelic mentioned that the semantics checks in `clang/lib/Sema/SemaSPIRV.cpp` could be simplified by using helper functions that are currently only present in `clang/lib/Sema/SemaHLSL.cpp`. 

It would be useful to migrate the helper functions out of `SemaHLSL` into a common location accessible to both `SemaHLSL` and `SemaSPIRV` to make the code in `SemaSPIRV` less verbose and more readable.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEUktr3DAQ_jXyZYiRZXt3ffAhbTANpFAaaM96jG01ssbosWH_fbGz29KW0JNgPPO9_MkY7eQRe9Z-YO1DIXOaKfSPmmY0gXyhyFz677N1CK8UXqyfgDwwUVdCdJ1g4iOwhluv0FkNC_pkyaOBNMsEaUaIuEifrI6gZ9QvEawHduDaST8xMTirmBiecZHX5_nL49dvpV5XduCgKTsDCiHaZXV2tGhAXSDHTceMbsUAY_Z6I41vnDIg6BwC-uQuQN5dYA0Y0af_MX96en66EpfA-D3j948JXm8ScsQxO0gEi52CTLjb-0cE5QQ0bkQ3zM2I9YlAgqZlIQ-OtNy2QWqNMVrlcMNVlOa_D6U3t9GezDbbJMiXN35NBq_G_thxGCOcMSiKuIMsFBACSiOVw7IwfW26upMF9tWxPjbdsWqqYu4FP5iat2asDZ6MOOmGC5RStbrq8HSoC9sLLlpeiUoI3jZV2WDVjgc8tlxVbdc1rOG4SOtK585LSWEqbIwZ-0rUp7oqnFTo4t43ITy-wv6VCbHVL_Tb0Z3KU2QNdzam-Bsm2eT2ou7ZtA_wmc7v_4BbiO9FP1KAX4ltkeaIRQ6un1NaI6vvmRiYGCab5qxKTctWGXe-PXdroB-oExPDbiAyMVwdnnvxMwAA___OUhls">