<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/92810>92810</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Confusing diagnostic for "address of consteval function" when non-ADL call to consteval function with no other overloads fails
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MitalAshok
</td>
</tr>
</table>
<pre>
Given this: https://godbolt.org/z/fTTPYGshx
```c++
namespace ns {
consteval void f(int i) {}
}
void g() {
ns::f();
}
```
The diagnostic given is this:
```
<source>:6:11: error: too few arguments to function call, single argument 'i' was not specified
6 | ns::f();
| ~~~~~ ^
<source>:2:20: note: 'f' declared here
2 | consteval void f(int i) {}
| ^ ~~~~~
<source>:6:5: error: cannot take address of consteval function 'f' outside of an immediate invocation
6 | ns::f();
| ^
<source>:2:20: note: declared here
2 | consteval void f(int i) {}
| ^
```
... When there is no address explicitly taken
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0VM-P6yYQ_mvGl9FG9jiO44MP2WTzLq3Uw0pVj8QMNn0EIsDJ2x76t1c4v7arbLWq9BCBCXwM33yeQYSge8vcQvUM1SYTYxycb3_VUZhVGNz3bOfkW_tNH9liHHSAcoVDjIdkAG2Btr2TO2fizPkeaPsX0Fa9vv72x7cw_IB8A_nqMi7yc--AnlOfVq3YcziIjtEGhPqyip2zIfJRGDw6LVEBLbWNqIGaCVVvLk5vxjRO4B5oecWdvdmJbLlS5x0onz-evnJ77-x1YJRa9NaFqDvsJwl0uKrwMLbL33Id3Og7hvIFytUCylVRJOHYe-eTEZ1DxScUvh_3bGPA6FCNtovaWeyEMUBrDNr2hm8gBKo1UI0nEdC6iOHAnVaa5SVORFwg1OtkfBr0tDmh_k4NoXp5yJrSL09krYucZqBapesld0Z4ljiw57tTul391a93p_KgQfVyZvipptW_JO2ETZpE8Z1RSOk5BHTqHZebvNc43BiDlpxQwqLe71lqERm1PbpOJOj_0_XC_ouq_gQ175c_yuvZbIa_D1M5s-eU0dbdFOMfB6M7Hc3bpKTNZFvKpmxExm1RFwsqiRZVNrSkloplIUVZ1_W8aZg7ylUpi0LJJp-LTLeU0zyvKC-aosirmayLomoqVe5URUVdwTznvdBmZsxxn16PTIcwctvQssgzI3ZswvVZ8m0CPe3GPsA8NzrEcD8WdTTcrp1VY6qY90WrnEcg-s98ACI8JT2ss0-rzS9T-aV6fJA6Jx2HJJdL2qE7sjdOyIBKaBOy0Zv2w9uo4zDuZp3bA20T4cv0dPDuT-4i0HYKOgBtp7j_CQAA__8OM52X">