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

    <tr>
        <th>Summary</th>
        <td>
            Include-cleaner ignores nested template arguments in explicit instantiations
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-include-cleaner
      </td>
    </tr>

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

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

<pre>
    $ cat a.h
```
#pragma once
struct Foo {};
```
$ cat a.cc
```
#include "a.h"
template <typename T> struct Bar {};
template <typename T> Bar<T> bar() { return {}; }
template Bar<Foo> bar();
```

"a.h" is marked as unused, despite explicit instantiation making use of type `Foo`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0kk2O2zAMhU9Db4gEsuTY8cKLyaQGuu8FaIlx1JElQz9F5_aFk7SDFAhggKaE75GPFKVkZ888wOEEh3NFJV9DHD7I2Kg5V1MwnwPIBjVlpP0VxBnEG7Ti8d1TqdZI80IYvOb7Wcqx6IxjCAjdCbozqNML-K-41q_UrdeuGEaQcutByvtN5mV1lBlBvefPlT0tjD9AfcNH9RPF_6u_Zk4UQb3ffieKII8g-43GyLlE_yWEW3gWu7NjCE_0S8sPXw8zaBMuFD_YICUsviQ2IN_RcFptZuTfq7PaZrQ-ZfLZUrbB40If1s9YEmO44OYFoRVbD63YV2ZQplc9VTzU7bHvVd8c--o6NGrqtLho3RAb6kzDrZ7YUM31dKk7ruwghVSik3Vdq6Po91t2rI_6YJqL7uQBGsELWbd37teyD3GubEqFh7YRoq0cTezS7TlJqR35effY3k47Js9xW9_hXMVh43dTmRM0wtmU05dittnx8P0ZRDv7EDmh55TZ4L_pU5zLwj4ntP7FtFJVohuuOa8J1BvIEeQ423wt016HBeS4lX6E3RrDT9YZ5HhzlkCON3N_AgAA__9iw_bp">