<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64682>64682</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Add diagnostic for undocumented builtins
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Endilll
</td>
</tr>
</table>
<pre>
Non-user facing builtins could be too fragile to be used by regular users, leading to crashes.
Builtins for coroutines are one example of that (see #60863 and linked issues).
@AaronBallman proposed a generic diagnostic to catch this: https://github.com/llvm/llvm-project/issues/60863#issuecomment-1677257472
Possible phrasing: `__builtin_xxx is not documented and can crash the compiler if used incorrectly.`
False-positives are going to be suppressed by generic mechanism of suppressing diagnostics for system headers (`-isystem`).
I wonder, though, how this is going to impact compile times.
Since this is intentionally a low-effort mitigation for low-priority crashes, should it be added to the pool of good first issues?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU8-OszYQfxpzGSUihhBy4LDbr5F6qSr1AVaDPcC0xoNs8-3m7SuTkG_vvYAZ45mff38wRh49UafO7-r8o8A1TRK6371l51zRi713f4o_rJECDGjYj9Cv7BL7CEZWZ6EnSCIwBBzZ5XWurJEs9HcINK4OQ_4OUenfwBHa3CQJmIBxonhU5Q9Vvr3vXQcJYCTImthTBAwE4gnoC-fFEcgAacIESreRCJSumrJtKkBvwbH_lyxwjCtFpa_P1qou3zCIf0fnZvSwBFkkA0QYyVNgA5Zx9BITmw0ZJjNBmjiq6g2mlJa8UPqm9G3kNK390cis9M25n_vrsAT5h0xS-rbPv23IlK62gpF5Jp8Op-Zy0edLfdEPdH9JjNw7gmUKGNmPeaZqyo-PJ9EfX19fwBG8JLBi1twlg_cWDPoHjZAmAiPzwo4C8PAQgL2REMgkdz-qpnzMu6GLdFgkcuKfT4JHeWrSE8R1WQLFp4A7QTOZCT3HOQuw_5IP_WLuIV28x0QzTISWQswyqaY88KOcQbxk-QM-xVsK2RZpknWc8mqSz435fOMXLJ4XNGm_ICSeX755PP9mb-h1jn0in1g8OncHBCefBxoGCQlmTjxi3tvQ5p0lsARO992QGUWcNm9zyoygtWQzjEzyIuIyB6OIhYFDTLvfqlthu8peqysW1J2aqy51WZ7PxdTZ8nTBvunbptUnWw69MT3Vw9BiZevL1RTc6VJXZXuqT1VVn85Hg-e2r2w5tMaeq7ZXdUkzsjtmrx0ljMU2tWvqptWFw55c3EKstXG4meibMkrrnO7QbU7t1zGqunQcU_zVL3Fy1L1Z-z0MmaPVf3PdHv5iDa77H8nIsP8LAAD__5UeiE8">