<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57100>57100</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
HLSL half type not allowed as parameter
</td>
</tr>
<tr>
<th>Labels</th>
<td>
HLSL
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
llvm-beanz
</td>
</tr>
</table>
<pre>
Given the following code:
half fn(half f);
Clang produces the following diagnostic:
> ./bin/clang -cc1 -x hlsl ../half-param.hlsl
../half-param.hlsl:1:8: error: function return value cannot have __fp16 type; did you forget * ?
half fn(half f);
^
../half-param.hlsl:1:16: error: parameters cannot have __fp16 type; did you forget * ?
half fn(half f);
^
2 errors generated.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1ksGSnCAQhp8GL11jIaijBw8zuzubw97yAFsIrZJiwAKcZPL0Qc1mK1up5BRLoOG3__4Ae6fu3bO-oYU4IQzOGPdV2xGkU0j4idBHQk-TMAMMlrBmjwhrCT_v2t4_GJGSZu_UIjF88FJajNaFqOUvx589f4KcsEuvk_dFbh4HKQs4fIPJBAP5qq41D7Pw4pqvi3vqHxV-KlJrUgP03vk1GBYro3YWPMbFW7gJsyBIYa2LMIkbwuvrMBc1xPucdnxOtArubkn8fsQIhJ2A8MteFeBvRwH7Q6qnfzIW9W-Qm44RffivZPCRkO0IAUa06EVElWfYFXVNWUUZbzPVcdXyVmRRR4Pdp5fPL3uhlQlWULHeMioQ4X0X2eJNN8U4h_XC2SW9o47T0ufSXdPEmNvbcEj_zBeUMU11CAuGFFTHgtJs6mreVGXTqKHp5bFsykHVoqY9LwommrZuMyN6NKEj1ZkwtrKlgVSPme4YZYw26UPKj8Uxr2VTcip6pdixFyUlJcWr0CZfEfJ0nJnvNpp-GUMSjQ4xvIsiBD1axK1S8hdLnNxbBgr7PdvYuw38BzyNA3U">