<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54892>54892</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
No diagnostic issued for __attribute__((target)) multiversion functions with mismatched type signature
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
tahonermann
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tahonermann
</td>
</tr>
</table>
<pre>
Following the changes made in commit [8b6f1cbb21c58e255156aa32ac55530c807055a9](https://github.com/llvm/llvm-project/commit/8b6f1cbb21c58e255156aa32ac55530c807055a9) for issue #50192 for Clang 15 trunk, a diagnostic is no longer issued for `__attribute__((target))` multiversion function variants declared with a mismatched type signature. In the following example, compilation should fail with a diagnostic on the third declaration that explains that the function type is not compatible with the previously declared variants.
```
$ cat t.c
__attribute__((target("mmx"))) void foo(int p) {}
__attribute__((target("sse"))) void foo(int p);
__attribute__((target("sse4.2"))) void foo(unsigned p) {}
$ clang --version
clang version 15.0.0 (https://github.com/tahonermann/llvm-project.git 5531abaf7158652bf7411937781780e9f6358ecf)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /iusers/thonerma/tmp/cmplrllvm-28177/../../install-llvm-project-main-Release-On/bin
$ clang -c t.c
<no error>
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVE2P3CgQ_TXuC7JlsPHHwYeZ6UTKJSut9t7CGNvsYrAA9_T8-y2wezJJdpJZycJQVVS9V1RVb4aX7rNRyjxLPSE_C8Rnpifh0MIGgaRG3CyL9Cihj01fjZj3PcGcNoJQimnFWEEYp5QWOW_yOqeUtQk9J6SZvV9dUjwk5DN8k_Tz1mfgDA5KXe-_dLXmb8E9HPdAsPlwHNKi0VgkndsESkhBc9ySKHpSQAJhirzd9D8JeUIMDZJN2jgvOdxA2iBlgOhxfYjXkiq_XJj3VvabF5cL0IDPMzsJABYCggVaNuXlVVgnjUbjprkPmyuzkmnv0CC4YhY8PgNniLtItzDPZ5D4l1UgJyfN_GZFhr7omPLx9QHEjS2rEgEwpGOVikXfbjabAohMqrvXN2zM7sXP0g5H9P2an5kHl6tiUrv9FMPdIUc4MRc-hoNbvRJ7hGC4WnGVZnPq5RupO80syc9J_nCsVX58-5GUiIdgGd8Fv0gq7Mmy3GA9EgyPejUyvIcBrdQerUGW1I9Jff6QO-fE79wlxeNHXZUZec_bpsNbQlJ-QvgmD7ES0_Sol12xC-8lhGmWZzn6dc94Nhst7MK0_qF1MrBD0BiY9WysMW0qSvqxLjFui7pucN3koh2rAnqJj4FEhPDXzrJ4QLemulRlCn2izbNOldTbLZ30dtjNVrABLWYQKlivxsnbrvqinWdKieEsbVABLrk5IBXgHmjDdllDd0Nd2wibAKQaJFl2X-TuKH3LKl2gaNM_hRLMifSPQLqX-p3s8m-llhRP0NrCWgOYPv1QnqehK4a2aNnJS69E99V8PxVeB8FvpsB_jwC3d867_X7arOr-91iMqEJKadm05DR3rMZVTcaC47okPRmaphhJUzdlW5asGehJsV4o18HEhsLV4nknFoqYnk-yIzkheYkLTHOK66zlbYVJ0ZNxGMumL5MyF5B7lQUcmbHTyXYRUr9NDpRKOuj-VyVzsQfEEe67Mo0B2Qa1YLs3ilPE00U-_wJE6RNQ">