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

    <tr>
        <th>Summary</th>
        <td>
            [[clang::musttail]] should be allowed on calls that aren't a sub-expression of a return
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement
      </td>
    </tr>

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

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

<pre>
    clang should accept `[[clang::musttail]]` on the call without return as it's equivalent to the call with return.

```
void f(void);

void g(void) {
 [[clang::musttail]]
#ifdef NORETURN
  f(); //  error: 'musttail' attribute only applies to return statements
#else
  return f(); // OK
#endif
}
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEUtFu2zAM_Br5hWgg03ZUP_ghRZeXAS1QbB9A23SsTZEyiU7Xvx_keOuGYRhAwALuyOPRRynZk2fuVPOgmseCFplD7GgmIU9fiz6Mb93gyJ8gzWFxI9Aw8EVA7fXa8rCCqjqo6nBekghZp5rHXHsNwYPMDAM5B69W5rAIRJYleqAEVhSaBPxtsVdy7AUk_MnfyDulD7n2eit9uAY7wqTwPj8Utqp6uJFW4PQOgDIZgf9tqw8KKzuNPMHT88uHT59fnnLbqnGbDwqPCo8AHGOIqjqAQvNrChogkWj7RRiCd29Al4uznLKpzXMSEj6zl3STY5d4Fdnwv7WeP25MP9opP83j74coxq4a26qlgrvS1GVVNsaUxdzp_aj3RmtssOWap7HRSFXTtCNSjzUVtkONja600Vi3VbmbTGmoGvqhrge637eq1nwm63bOXc-7EE-FTWnhrqw0Yl046tmlNTaI7Gfyw-pMIeYcxS633fXLKalaO5skvQ8SK25L3L9_yM-89QzkXHjlMacpJyOBzCRAkb1CI0CQlv6Ov18ip2SDhzABbSctlui6WeSSssZ605OVeel3QzgrPOadts_dJYYvPIjC4-o0KTxuZq8d_ggAAP__1Zf5cA">