<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/93369>93369</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
"did you mean [builtin function]?" diagnostics print a useless declaration site
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tbaederr
</td>
</tr>
</table>
<pre>
Consider:
```c++
constexpr float A = __builtin_isinfinity();
```
The output is:
```console
array.cpp:1570:21: error: use of undeclared identifier '__builtin_isinfinity'; did you mean '__builtin_isfinite'?
1570 | constexpr float A = __builtin_isinfinity();
| ^~~~~~~~~~~~~~~~~~~~
| __builtin_isfinite
array.cpp:1570:21: note: '__builtin_isfinite' declared here
array.cpp:1570:42: error: too few arguments to function call, expected 1, have 0
1570 | constexpr float A = __builtin_isinfinity();
| ~~~~~~~~~~~~~~~~~~~~~^
2 errors generated.
```
The "note: '__builtin_isfinite' declared here" line is useless and confusing - It's not declared there at all and in fact is declared nowhere since it's a builtin function.
We should simply not be adding this note for builtin functions.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVMFu4zYQ_RrqMohBjUw5PuhgJ2ug9wI9BhQ5kqagSYGksutLvr2gHCTZrNOiRQlCBIV5M--9IalT4tETdUIdhXqs9JKnELvca7IUY9UHe-kegk9sKYrmIOSjkAfRyus0Ao9lrn9N8CnTjznC4ILOcADRPMLTU7-wy-yfOLEf2HO-CLwXuBfN8VO61-36_X0iCEuelwycblQOPgVHHxE6Rn3ZmHkWzaFWOymaA9aiOQDFGAp5WBJBGGDxlozTkSywJZ95YIogcHeb6040R7Bs4RIWOJP2n0PXQFoDT1cqUOqD2D3AfzYF1lFSCPXt5dfxOeoGob93xYdMZf1KDLyZNFH8OtkWf7I4hwADfQcdx-VMPifIAYbFm8zBg9HOCXwA-jGTyWShLrtJPxPI_8-5gr41brj48iLUtysMryISjOQp6kx28w_HUyD-SxMRwbEn4FTOoqOUQHtbpA5LYj_CHfyWBe5S6c47Nhcw6AzauRXAHgZtys14D_Lh-xqW2BsCvqbR8ErqrQebjyr-IEhTWJyFxOfZXdayPYG2trDJE69MCIYQf8mUNpXtGrtv9rqirt7VbVtjK--rqWtlLVU_GN2bHZHUSg690vt66NseNaqKO5S4lQqV3Cop7zdNS1YZGvpGNWqvjdhKOmt2G-eez5sQx4pTWqjbN027r5zuyaX10UI0TvtRNAfLevQhZTZJIJbXLHYFfdcvYxJb6Tjl9J4vc3bUCcSfr7Y6ftYp1GO52IjwoQLMkX0G_dbHax_0eswTZ6qW6Lop53l9vPAk8DRynpZ-Y8JZ4KnweF3u5hj-JJMFnlaRSeDpqvO5w78CAAD__we1yrs">