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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] `modernize-use-emplace` doesn't catch this example
        </td>
    </tr>

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

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

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

<pre>
    a.cpp:
```
#include <bits/stdc++.h>
using namespace std;

int main() {
        vector<pair<int, int>> a;
        a.push_back(make_pair(1, 2)); //caught

        vector<vector<pair<int, int>>> b(1);
        b[0].push_back(make_pair(1, 2)); //not caught

        return 0;
}
```

clang-tidy -config="{Checks: 'modernize-use-emplace'}" a.cpp
```
a.cpp:6:4: warning: use emplace_back instead of push_back [modernize-use-emplace]
        a.push_back(make_pair(1, 2)); //caught
          ^~~~~~~~~~~~~~~~~~~     ~
          emplace_back
```

clang-tidy --version
```
LLVM (http://llvm.org/):
  LLVM version 14.0.6
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: skylake
```
[clang-tidy wiki](https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVEuTnCAQ_jV4obQc8HnwsPPYyiGp5JJct1AYJYNoCc7u5tenYZxZNzVVeVmtCDRff183UA_8tWJRM46IPqB4j-IHlMWLXbqESt2omQuM6K6W1iDyaCxvENmCRR2ih4vnbKRusWa9MCNrBAYnRLcLiv9KbXHPpEakQKTEKL_NlmfR2GGCCCOTrgFXRHbYNYBPD5itsEoWjbPpnmrWnACrZyfx5NeRYuNWEUB3RrcYyII1bG47u6ayDvm72C58fcEu1yxqlG5jlO7_koweLL5LaBJ2njSO32Lk-_s18d9GMd2GVvJXHDaDPsoW0T0iBNK660RzMlBSCJn3AxeTlj9EOBsRin5UUB0Yd-iE4Ev174W57osM3sSBPTPA0a37BSi8QHnlkC1jBeN4OOJbOjAk6H70dBGGl-d_CopvD0oPKP8Xu6zOD78CrhX-YSXCs5iMHPRd948fv30CBUVnrT9wXotS5z4aptb3yts5xNh7L3B4k0RxlF2nPo9W9pBUjutZKh5dx_fiyGZlsWVTK6wr1EuRPWVJODahknp-CVs9X50_DMbi3Zevzs2cXhVk_b7IdLtS-CxP0tXvosLcZHiXaCVGvNiJXSf8Wte57EzyeNsX8L_aGVFne-XS4CMHotpk2SZNUpoUAa8oL2nJAiutEtU7WsAIA-H7uy2LMR-EgXsnd0fPNh22nTRYvDDwEME8qeq9mFbabq6jZuiXAi1NOE7Dd7guoCuNmYVTkua0JEFXZXSTJ0m8KVKaH4skb3idHrMjieMmKbMNDRSrhTKON5w7LZ6xh3AnNt0HsiIxIXFBMteSPCopBa2MxLzgNM05SmIBl6e6pTiYKk-pnlsDk0oaa94mmTGy1cKnyeGz2XYDrJjOkkMJpAl89Mqz_wmKA7qE">