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

    <tr>
        <th>Summary</th>
        <td>
            Incorrect warning from -Woverloaded-virtual for class with multiple inheritance
        </td>
    </tr>

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

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

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

<pre>
    This code has been tested both with clang-14 bundled with Ubuntu 22.04 and clang from the main branch in git at 2023-07-01.

If the code below is compiled with `-Woverloaded-virtual`, the compiler issues a warning that 'D::f' hides an overloaded virtual function even though the only visible `f` function in `B` is the one overloaded in `D` and `C` has no visible `f`.

In the case where `D` only inherits from `B` there is no warning, as expected.

command line to reproduce: `clang++ -Woverloaded-virtual test.cpp`

```
class A
{
public:
  virtual ~A();
  virtual int f(int);
};

class B : public A
{
public:
  ~B() override;
  virtual int f(int, int);
private:
  using A::f;
};

class C : public virtual A
{
public:
  ~C() override;
private:
  using A::f;
};

class D : public B, public C
{
public:
  ~D() override;
  int f(int, int) override;
};
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVMGu4jgQ_Brn0gIlDiRwyIGAkOa-qz3bcZP0yrEj24Gdy3z7yg68B2_fiMNKiDhOuapcbbfwnnqD2LBty7anTMxhsK4ZrQtkXSat-tn8MZCHziqEQXiQiAYC-oAKpA0D3CgM0Glh-lWxATkbpVEts3_K2YQZOF_nGxBGLTC4ODtCGBBGQQakE6YbgAz0FEAE4DkvV3m9yos1y08sPyz_Py5pTTIiUdsbJFvjRB96rMpXf9krOm2FQrW6kguz0KzKGT_eVye8A_J-Rg8CbsIZMj2EQQRgvD6x8sDKw4XxGgZSEWPgkxPunHCZTRfIGsBrDGSwcz8kCWv0T7iSJ6kxOrqwKv9Ek4lzbZwjf8fjM_8COEVATIxV-TGOY_TGfuV9DcgsWxQe4Tagww-iZInMgI6CX-J_mAgJSIn8HkXMSnjAfybsAqoXjc6OY7SlySAECw4nZ9XcISsPkTMVmPGW8Ra-K0U6OetummJNnnjj6_JbZLTwHh7f6nYZTLPU1MX6pFf4qMWvA-M7xvesbL9-IhPgwviOTHgGsFjn9mVnSbKFuJFF6L3-r3bRTfVzpPCdgSN88TE5uoqAT5yzj6fx8DiF7wwfnw0_NN8bP_7O-P82dHo21MYt38fHt6ZOv0_z2xT_C3wx9ThSmWpKtS_3IsOmqHb7vK73RZUNzV5ipQqFu3pbl3xb1ZuikFLtRCG3RVVuM2piL8rroih4sSur9V5cum2FRV2hlLws2SbHUZBea30d19b1WeorTVXu8iLTQqL2qbVybvC2NB3Geey0rolrVnLuPdvkmnzwnyyBgsbmh-msc9iFjyaVru639-piHSwFSJ1wnHWgSePj1gvTYTY73QwhTD6Gzs-Mn3sKwyzXnR0ZP0f1-2M1Ofs3doHx89IoGT-nPf0bAAD__xrc3zk">