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

    <tr>
        <th>Summary</th>
        <td>
            Unresolved overloaded function in dependent comma expression
        </td>
    </tr>

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

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

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

<pre>
    ```c++
void f(int);
void f(double);

struct weirdo {
    void operator,(void(*)(int));
};

auto x = [](auto t) -> decltype(t, f){};
auto y = [](weirdo t) -> decltype(t, f){};
auto z = [](auto t) -> decltype(t + f){};
```

`x` fails to compile with
```
error: reference to overloaded function could not be resolved; did you mean to call it?
```

`t, f` is a dependent expression and well-formed with some `t`, as demonstrated with `y`, so `x` should be well-formed.
Considering that `z` compiles, as well as any other operator, I guess it's a problem with the comma operator.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU82O-jYQf5rJZQRyxhDCIQdYitRz1Qdw4glx5diR7cDyf_rKgd2lq1XVSlYsefL7Go9VjObimBvYHmF7KtScBh-aP4xTnRqL1ut7A5V4rA7omJc4gThcvdHYA9XGJaA9yO_n2s-t5dfS4xtTmLuENzZBe4Tds4iIuGD9xEElH4DegOp8BFQDHTLTp9or6-70TUHNyeM7gjzhIxZQvZxlKK5A_oaaO5vuEwPVCegtG95nKy9cC-L-T5an6f_P8-s_u0Gg4080n7fwmhQq8Q6VwF4ZGzF57Pw4Gct4M2n4Ecch-ADygIF7Duw6zjB_5WC90qyxn12XjHfY-dlqdD5hyxg4entlDfKI2mi8-xlHVm7RVNaiSSDP_-702aBKoImoUPPETrNLyO9T4BizqHIab2ztqvdhZL3kwOhHxoWgEplDRdQ8ehdTUOnjJ6jE_VmPHj8aE4clRcuvrOuHpTfvotEcjLtgGlTKoF8Z9GxifGplZN6Vu6NPA4fXEcXf8TJzjLkBtMu5puBby-PDVRo4043qE7MudCP1Xu5VwU1Z7TZ1ud0RFUNDYqP6ijbU70XflkRtud9LQbSRdSlkXZiGBElR0q4Ucku0riT1G6Kq5bqsRV_BRvCojF1bex3XPlwKE-PMTSWklIVVLdu4vHQixzdcikCUH35oMmbVzpcIG2FNTPGLJZlkufnTfUzBj_Ni3MuVPjJ_XWwxB9sMKU0R5AHoDHS-mDTM7brzI9A5Sz231RT8X9wloPNiMAKdlwB_BwAA___iyWZw">