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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] [Sema] Assertion failure in `clang::Sema::LookupSpecialMember` with paramter pack expansion on assigment operator using declaration
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    ```
template<typename T>
struct Base
{
};

template<typename... Types>
struct Derived : private Base<Types>...
{
public:
    using Base<Types>::operator=...;
 Derived& operator=(const Derived& other)
    {
        return *this;
 }
};

struct Foo {};
struct Test
{
    Derived<Foo> data;
};
```
https://godbolt.org/z/zGM6bqPE8

"clang::Sema::SpecialMemberOverloadResult clang::Sema::LookupSpecialMember(clang::CXXRecordDecl*, clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool): Assertion `isa<UsingDecl>(Cand.getDecl()) && "illegal Kind of operator = Decl"' failed."

The code compiles fine when assertions are disabled.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVF2PqzYQ_TXDy-gixw4BHnjIQtKHdtXqdqvuq8Gz4F6DqW1y7_bXVyZkv7RSGyXYyficM3NmHOm97ieiCrI7yJpELmGwrrqXP05_5ixPWqueKziw7c2OgcbZyEAg6vA80yRHwgcQJ2BHH9zSBbyTnoAdIb9bnw2IdfMpNE1TfHieyb9jaMjpCykEccTZ6YsMdGUV9e1wmqYvGvPSGt2BiBqIiIvXU_8REMPiaGdyMlgHookMa2Y3OeAHfBMHXnR28uFdOAzkgJeb0FUet5ejsLgJgR_DoP3GHet_78JW49naFX-LbD8_kA8vhUXWm7qoz9aCOKGSQW5kL6xv-jOEMPtYLD8DP_dWtdaE1Loe-Pmf-Pnp_tD-_dupuGYDnHdGTv3Vnt9plNtupk5Lc09jS-7XCzljpfpKfjEBPwX8Yu23ZX4Hiw6-Hq0fH79SZ51qqDPAj8Drz5nqx8cPNDW21pr_Xss4MEfvyQVtJ4QD016CqP-IA7HKihPwopaTSnsK10SKiOMlAj_EFgPn2hjqpcGf9aTQPr0MBYJo8AriwHN8ktqQSuO31cuHgbCzKj7GWRvy-KQnwu8DTShvWXmUjlBpL9sITlQlVClKmVC1ywUvM8YykQzVXlJXFK1QnBVdXuyKvNhlnMuuy3PBuUx0xRnf73aCsZyxjKUl42Xb7UWZqaJUOYM9o1FqkxpzGeMEJNr7hardrthlRWJkS8av9_51Bp6cnQJNKtaUNYmrIvZLu_Qe9sxoH_wrW9DBrP8b9QrOGoTsbm1j1rzpQnRpcYR6bcj_np0Dw-86DDhLJ8dADmfZfUP6McvJR1q7eqr7kabw2qHr1VfUGelklE8WZ6oPd0KHYWnTzo7Az7GabfkyO_sXdQH4eTXKAz9vXl0q_m8AAAD__9LUle8">