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

    <tr>
        <th>Summary</th>
        <td>
            `performance-unnecessary-copy-initialization` not detected
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            false-negative
      </td>
    </tr>

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

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

<pre>
    ```cpp
#include <list>

class V {};

struct S
{
    std::list<V> argumentList;
};

void f()
{
    S s;
    const auto argList = s.argumentList; // should use reference
    if (argList.empty()) {}
}
```
https://godbolt.org/z/31r8d3vfP
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsks1u2zAMx5-GvggOZMqOnYMPbVOfdhhQoHdZoh0NimToI0P69IMTpx26AYIkktDvT1KUMZrZEfXQPENzLGROJx_6yQT6LS9UjF5fe9jz-1LLAvwI_AlQGKds1sRAvFgTE4jXLXTblZUxsncG7TO0RxDPfwdjClkl9rb52i3IGGMxaRBPIJ7uzJd3EK9MhjmfyaUfN98D9Q_24o1mE2AHePgP-o3FzwerrbyLicmc_CqwshmII4u7b3IMcAAcWDz5bDXLkVigiQI5RV80MzHAbgPt6Lyk65YJHh5d-Mz7fnl09W6eUlriWvtNbfZ69DbtfJgBhw_AQVSh0-Iy_Sx0L_RBHGRBfdUir0W1r5ri1FNFXKuqJa0kVTUq2XUjn2jf1JWUdVWYHjnWvOUdP9S8anYNUTu1nHiNUzXyCWpOZ2nsztrLedUuTIyZ-kPHeVNYOZKNt0lBVFa6uUxGXwER8AUQJ2kjlY5mmcyFVndzLEK_ssoxzxFqvv5q_KInkyyt47VQmHw4S6eozM6RohhluJbKL9fSOJOMtOZDJuMd7DlzPjFNiVQiXeRg-2_NM-mUx53yZ8BhFduOcgn-F6kEONzqioDDvbRLj38CAAD__wbO5hA">