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

    <tr>
        <th>Summary</th>
        <td>
            [clang] Lookup failed in friend function declaration
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Clang is the only frontend failing in the following example ([godbolt](https://godbolt.org/z/q6azET3xs)):
```cpp
namespace A {
 using F=float;
  void f(F);
}
namespace B {
  typedef short F;
  class Y {
    friend void A::f(F);  // OK
 };
}
```
It's a stripped down example from the Standard: http://eel.is/c++draft/basic.lookup#unqual-example-2
See [D147848](https://reviews.llvm.org/D147848) for details.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU09v2z4M_TT0hUhgU_GfHHxIfqmBHzZgh-6yo2LRiTZFciW5afvpBzluVnQDBNjik8jHxycZgj5Z5hbKPZSHTE7x7Hz7YJU2xmRHp17b_4y0J9QB45nRWfOKg3c2slU4SG10Au0MDs4Yd00BfpGX0TACNVDuT04dnYlQHoCac4xjALED6oC6BVo7fwLq3oC6p0q-PXwXLwFom5bYQX6AfAdVflv9ON4iVl44jLJn3CHU-1sQp5AIdCAOg3EygngH8NlphQNQ0815lzjUh8_p9h_SYXwdWfGA4ex8THnvSG9kCPjj42HEweukzFxrl8iL3YeSiLe28duX5Uoq_xeVe6-37f8RqA4oMUSvx5EVKne1d5EH7y6z_o9RWiW9ArHDJPNdZWaz1gGo64H2QHvl5RCBuqMMul8b535NI5CY7NMkzWrJu6Jb9UdmhHJ_KDZ1s2n-NUTPz5qvYW3M82WZ5Ptp2uLgPCqOUpuwzlQr1FZsZcZtUTUF5aKoRXZuy4pV0Yu6UTX1m35bDwPLUknZVNuyoCrTLeUk8k1R5E1JpVg3tSxrkW83zVGpRtSwyfkitbmzyHQIE7cV5VWRGXlkE2abE1m-4gwCUXK9b9Od1XE6BdjkRof4p5cs6mjm99GndwDlAb_Oes3mZ5W8v8x8mGwftbOouDfSy_SfTd60nyyv43k6rnt3AepSmeWzGr37yX2ay0wuzWsm_zsAAP__ZMAY0A">