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

    <tr>
        <th>Summary</th>
        <td>
            [WebAssembly] `__has_attribute(musttail)` evaluates to true even when `musttail` is unsupported
        </td>
    </tr>

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

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

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

<pre>
    $ cat test.cpp
```
#if __has_attribute(musttail)
#warning HAS IT
#else
#warning DOES NOT HAVE
#endif
void F(void) { [[clang::musttail]] return F(); }
```

$ clang++ -std=c++20  -target wasm32-unknown-unknown -c test.cpp
test.cpp:2:2: warning: HAS IT [-W#warnings]
    2 | #warning HAS IT
      | ^
test.cpp:6:6: error: WebAssembly 'tail-call' feature not enabled
    6 | void F(void) { [[clang::musttail]] return F(); }
      |      ^
1 warning and 1 error generated.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysU8uOozoQ_ZpiUyIyZZ4LFuSmo76b24tu3V62DFQI046JbJOo_35kQr9Go1lNFMsH6nXOQaWcGwfDXEO2hWwXqdkfJ1uro_LKqNeonfq3GijFTnn07PymO59BNJCL9S8aIDke8OXlqNyL8t6O7ewZqDzNzns1aqDqlnVV1oxmwPvmEf99ur1j7fh7dPdw94j_PTzhffP_3Zpk-vEAorlMY497oDIAoAqh2OLCfNtpZQaQDcjmY262g2yHlv1szVIWmMgtQrH7VUIYk-KtCW2Bthg734PcdbdHEoixV3Zgj1flTpLi2bya6Wreb4y7rwZ9QNnQenBVGODNgsA9fv7U7gJl0SAiEkLxD_7ONFx-SzS7-z4pXw-ytZMN4Jnbxjk-tfoNgYpgS9wprYEKPLDys2U0k0c2qtXcr-3zpf1fdfuT9Q0s1JN3S1CZHpMbbRzYsFWe-03U17KvZKUirpMiF7JMK5FGx5oKUfSpSluRsExFIWRflXkpu66UedYdorEmQVkiEplUaUnp5iDygyzLiouUDpUQkAo-qVFvtL6cNpMdotG5meskl5TlkVYta7dsBZHhKy5RIApLYutQFLfz4CAVenTefbbxo9fLOn2xPhgDufjziuQC-aL0rDw79BN6OzPyhQ1ej2xC_Ud2LnB0OBs3n8-T9dxHs9X10fuzCx-F9kD7YfTHud100wloH9itV3y20w_uPNB-0eSA9qvoS00_AwAA__-q5ja7">