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

    <tr>
        <th>Summary</th>
        <td>
            False negative in clang-tidy check readability-convert-member-functions-to-static with nested classes
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

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

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

<pre>
    The check gets confused when a method has a nested class.

```c++
struct Foo {
  // No warning emitted.
  void canBeStatic() {
    struct Nested {
      int Z;
      int getZ() { return Z; }
    };
  }
};
```
https://godbolt.org/z/vW77fseY6
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlUk1v2zAM_TXyRbDhSPHXQYcWQY69bMCw3mSbttXKUiHRCbJfP8ZxmnYD6I_3SJF8pFrfX9TPCXg3QffOR8DIO--GJULPzxM4rvkMOPmeTzoScBCRXJ3VMWYsP7D8aXuX-c06Jp6vtrIRw9IhP3rPWbVxnDNxJOMvnp91cMaNHGaDlDe7R5y8oSLaPcMP1GgoZ81E8zUH51vul1tH31ycG4f8lcn_OFL4-kjGA-AS3BpJ-PCIvoLH6U_XV_pT8Q1OiB-RyaebuNH3rbeY-TAS-kPP6VdVDRF-lwmoXVnUTVHtmyLplewb2egEDVpQR20j0JRHUn0Cavk6ajemaPrLtqQAutetsQYvKe3qBAHTGeYWQjosrkPjXUzRp3GdHD8bnL6tDWKyBKv-6Zeiljbr_EzA2tP9k34E_wYdEjQxLhDppyirskgmJbVuhkLuZV3JSsNe9L3clbuqLQF0XorE6hZsVKygCyEeOgiw4pAYJXIh8kpUYid3UmZ53eZDS2fqQepaANvnMGtjs2sj10kmQa09tcsYyWlNxPhwkjQzOoCtnnvTM8RGbtX0Qrc4qDubrGrUKuUv5-vppw">