<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57647>57647</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
trailing_return_without_auto diagnostic is missing source location if the function has no return type written.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:frontend
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hokein
</td>
</tr>
</table>
<pre>
Sample code:
```
struct S {
S()->int; // error!
};
```
The diagnostic error `Function with trailing return type must specify return type 'auto', not 'void'` is not attached to any position of the code.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxtUc2O2yAQfhp8Ga2FwT_rA4em6b5Aeo8wEJuWgAXDrvL2xfZG7UpFCJgZmO-HKeiHuMj76gyooA3h3wg9E_pce_o59zBhzArhAmQ4HRko40LYK2HjC-E_rEfCT0DYW5lgYgyRsOaz13Autf_2PdafiwFt5exDQquO11DuvGWv0AYPHxYXwCits36GaDBHD_hYDdxzQkirUfb2-FIgbJAZQ9kI-w4-4JZ5D1ZvmZ6CTXtSIkq1GA0YQPoHrCHZHTLcAJfDmroyoul7NjDetl2lBdcjH2WFFp0RT1rXA_26cQ0Zrxv6v6oK4N2mtAlIIUdlwAUldyx7YN2eche5kfsi5yNaROPrKkcnFsQ1bR-2uz0XwDzVKtxL4Nz7c3tZY_hlFJaw4GaTyqEb-naoFtHqsTGqfx0k1d2k26lpJeW666luOedj5eRkXBKkOxHGlJN-Lni3GHwhUSxkpDtXVjDKGB3p2DR8YG09jPr11rd8VHLc2pCWmntxp97o1CHOVRQ7synPqRSdTZj-FmVxZ_bG7Kilf3FwCVEs4bexvto1iF3AH4EO3kk">