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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Uninitialized value analysis for `out` parameters
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          llvm-beanz
      </td>
    </tr>
</table>

<pre>
    HLSL `out` parameters are uninitialized at the entry of a function and need to be treated as uninitialized values during the uninitialized value analysis for `-Wuninitialized`.

This was partially implemented in DXC (https://github.com/microsoft/DirectXShaderCompiler/pull/5047), but due to incomplete AST representations it caused a lot of problems in DXC. The base implementation in DXC may cover all cases for HLSL in Clang, so it can be the basis of the starting implementation.

### Acceptance Criteria

* -Wuninitialized treats HLSL `out` parameters as uninitialized
* Sufficient test cases to cover uninitialized value warnings for `out` parameters
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU0Fr8zgQ_TXyZWhwZDuJDz5kE8IeekuX7XUsj20tsmSkUUr66xc56Ve-tJQPDEZIM-_Nm_cwBD1YokZUf4nqmGHk0fnGmMv01BLa96x13bX5-_n8DGKTu8hik8OMHidi8gHQE0SrrWaNRr9TB8jAIwFZ9ldwPSD00SrWzgLaDixRB-ygJWBPyKkiPLS4oIkUoIte22Hp9s09oEVzDTpA73wi9_Tvb6_EJl-JfC_y_cuoA7xhSLzTrbmCnmZDE9kEry0cXw8g5G5knoMo9kKehDwNmsfYrpSbhDxNWnkXXM9Cno7ak-LX84gd-YObZm3IC3maozFCnqq83ApZC3mANjJ0kdK82iqXQJlgf34BT7OnQJYxKRNAMyiMIakBxnESbvauNTSFO8EVvIwELQb6ZL8Ufwww4RWUu5AHNAYUBrpJsyxPWzgYtENiFdwNzi5LuDXVIUGmQ-Ckkh0eUO5aClncPtgrRTOjVQQHr5m8xo8ne3jYxW3VAX7w0YMH7n3Ose-10mQZmALfp2J3H_Q7W7yht9oOv2zxBSvrmqKrixozatZbud7Ucl0W2djQliTWm9227ahvu6rY9ViWm05VZYe7ijLdyFyW-VZKWZR1Lldlrao6x3a33bbFpmtFmdOE2qxSgFbOD5kOIVKzzvN8LTODLZmwZE1KS2-w3AophTwIKZM66VAds48IxiGIMjc6cPjsyZrNktiloDrCP3-Qjq8yRG-aHxyf4O6_p9m7_0gl7y-Mg5Cn-0iXRv4fAAD__2gEcRI">