<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62008>62008</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            bad diagnostic for lookup failure in type-requirement in requires-expression
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            c++20,
            quality-of-implementation,
            concepts
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zygoloid
      </td>
    </tr>
</table>

<pre>
    ```c++
template<typename T> concept has_f = requires(T t) {
    {t.f()()} -> some_concept_i_think_exists<void>;
};
```

results in

```
<source>:2:18: error: expected concept name with optional arguments
    {t.f()()} -> some_concept_i_think_exists<void>;
 ^
```

The error message tells me that I have to write what I thought I already wrote. Instead, it should use a similar style to Clang's other "undeclared identifier" messages and tell me that either the name I wrote is not declared or that it isn't a concept (with a note pointing to what it is).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0U0Fvq0gM_jXmYiUiJiRw4JCXNFLvvUcTMOB9wwydMW2zv34FSdPVHvb2JDR4LPvz93lsE6N0jrmC_Bfkp8RM2vtQ_X3rvPXSJFff3CrYpfevBvo1f-kJ0oPyMFqjDNlRbyM7MzC-QfaCtXc1j4q9iZcWITth4PdJAkeg4g0VqETYP1AQcb7ougUqgMrHuT_hasaKfuDLA_AiF-3F_b7wl0SNkB0_vDSQvUD2AIP96cf-Jv24LmfgOFmNKO7f3v-GZsfop1DzAn0gyA6bArIDcgg-LMbXyLVy85S6iP8U7dGPKt4ZiyZ008BO4x_QiZC__I_Kt57vXHHgGE3HqGxtxIFRe6P4ir35YFSPn0GU8fPu1N5PXT9bxgY2zQ0_g1de46uLyqYBOqIoxt5PtsEpMhqMMog1AaPe7IJ4tMZ1QPuIXnsOCESTa7i2JnCD0rBTaYUDEH2zi2hcs1B8MmRZkrXne2tf71RQIjqv-MTz4R4vihId0F7RPB8FqFiexMw5jKMXp-K6RfczCahcJ02VNWVWmoSrza5Iy80m35dJX6VkTFuUJZW7rCx31O6LzSZjw3WxK7LtNpGKUsrSbbqnLKe8XO_KPW2Kus7zdpdfyx1sUx6M2LW1H8Pahy6RGCeudpSmRWLNlW1cdo-IXW9czfPMABHQEYgeC0fp0_M-GSt6W_l2JcNol3Azj9xPzl1-nB35KQnVXHp1nboI29TOE_VDRkUtV1fTYCOmcz6q1Nj6gNb739OIrRE7BUZxOO_46rHIc9HZ973XK_4aA8co3iVTsFWvOkbIDkBnoHMn2k_Xde0HoPNc-vFbjcH_xbUCnZemRKDz0pd_AgAA__8IG3Dp">