<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/99304>99304</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang accepts invalid overload involving explicit object member function
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ranaanoop
</td>
</tr>
</table>
<pre>
The following invalid program is accepted by clang. [Demo](https://godbolt.org/z/77M9z85e9)
```
struct C {
void f(this C );
void f(C); //EDG:Nope, clang:OK gcc:OK. msvc:OK
};
```
The reason this program is invalid was explained in [this thread](https://stackoverflow.com/questions/78758215/explicit-object-member-function-discrepancies-between-different-compilers).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8ks-OmzAQxp9muFhEZAwxHDjkT9ND1fbSFzBmALcGU9uQ7j595ZDdVFVVC8FgfxrP_OaT3ut-IqqhOEFxSeQSButqJycpJ2vnpLHtS_1tINZZY-xNTz3T0yqNbtnsbO_kyLRnUimaA7WseWHKyKnfMShOFxotFBfAcghh9sCPgFfAa2_bxpqws64HvL4CXoX4XL2WBVWAFWQXyI6P9yF7PPdfH9yiAjszEKdthzHGHtFqdcs6wDIM2kcNVsBPz_NtvavO7-fb2kr7cPkI_PjFzgR43loBfvz6ifVK3YMdG_26hc-7QVyAn_5TeAToSHo7sXt1f6B7o3mTntGv2Ug9Ucv0FAHetWFwJNt_cfRBqh92JdcZe9spOwJefy7kg7aTj1RLUZS4LwCvMbNWOqS2-U4qpCONDbm0WyYV1WmrvXI0y0lp8mlD4UYUd7uOHE0hVXactSHnAatd0ta8rXglE6r3Ave455kQyVArLLvuwHPVCkLsFMnq0HIsskIUZVeUia4xwzwTe7HP8pyL3YFzykVRyFyUKs8byDMapTY7Y9YxGiTR3i9UVxXP8sTIhoy_exVxGw5itK2roz5tlt5Dnhntg39mCDoYqs9R_jDqk3qkZ6yMwFdr1mjvN1RsQ8U2VOwNVbI4U__lZx2GpXkMIF77-KSzszEF4PXeRZzJ1sha4-8AAAD__yziE_s">