<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/119260>119260</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[HLSL] Report error when non-library shader does specify an entry point function
</td>
</tr>
<tr>
<th>Labels</th>
<td>
HLSL
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hekota
</td>
</tr>
</table>
<pre>
Clang should report an error when a non-library shader does specify an entry point function.
https://godbolt.org/z/4q1boabzr
Shader:
```
RWBuffer<float> Buf;
void foo() {}
```
Compile with: `-T cs_6_0`
Clang:
_no error_
DXC:
`error: missing entry point definition`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyckk-P2yAQxT_N-IISYfwn8YGDk9TqYU-7ldpbBAZsWsK4gHeV_fSV7ah_9ljJkiXmMTPv8RMx2sFrzaE6QXXJxJxGDHzUPzCJTKK687MTfiBxxNkpEvSEIRHhiQ4BA3kbtSeCePQ7Z2UQ4U7iKJQORKGOJE66t-a-6n0KdzKh9YmY2ffJot8DbYG2Y0pThKIF1gHrBlQSXdpjGIB178C68mcuUcj3sMlf1gGLnrZQ08dH2-evp9mYpXI2DkWC4hM5zQaKE9D2Fa0iBhHYEVhD4HCCw-VDgzPeJus0ebNphKIlUNPdF9LHa319KBbREsc2_Opxi-G6lS7fzr-3Ws-XJjcbo_XDP_6VNtbbJQGoaaZ4oZqiEZnm-aEoDoeqzGk2ct1UPa2NKEtjBG2kkLSuc0lVIwp51CqznFFW5ow2jOZ1RfdKF5WuxLHJhabHqoeS6puwbu_c620JNLMxzprnecNqmjkhtYvr0zP2-enlCRhbIAh80e_kPEQoqbMxxT8dkk1uxWW9UF3I84bEXzz8Jw3ZHBz_wIJN4yz3Pd6AdcsKj99uCvhd9wlYtzqKwLqHqVfOfgUAAP__gRPlfQ">