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

    <tr>
        <th>Summary</th>
        <td>
            clangd `UnusedIncludes: Strict` false positive when only concepts used from headers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    If I have a header `concepts.hpp` defining a concept
```
#pragma once
#include <concepts>
#include <cstddef>

template <typename T>
concept HasSize = requires(T t) {
                    { t.size() } -> std::convertible_to<std::size_t>;
                  };
```
and a file `main.cpp` using the concept
```
#include "concepts.hpp" // clangd unused include warning
#include <vector>

static_assert(HasSize<std::vector<int>>);
```
`clangd` will issue a warning in `main.cpp` that the header is unused, and suggest the automated action of removing that header.

Doing so of course results in errors.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEk1FvozgQxz-NeRkVgZ0AeeChbRpdn3fvuTJ4AJ8M5jxDqu6nPxlIdq_qaqMIBPOf8cxv_mgi20-ItTg-ieM50QsPPtTtECyhC94kjTcf9WsHrzDoK4KGAbXBAKLIWj-1ODOlwzyLIgODnZ3s1IOGPSSys8geRZHt_-1RqjnoftQQRfd3dmrdYhCEer4VFurlyzCxMdj9jK5XxnF2mlcFf8w46RHh-12014S_NH2zP6LqDAH_XWxAErL6DizkCUT5tMnhi58on4BTsj9QyGpTn-FBqBcgNkI9ChVPuWJg2zh8Yy_U8z0S0944tqN-e4Qoz_foJ2h6MqChsw4j-VHbKW036gtF5Dzgn6DfCUr5v81JCUJehLxA6_TUG1imhdDATf-uQ9zqV5u4Yss-fFoEsWbbvmkiDCxktRP_FcYt79lOG5IXIU-_Gz06bW0sTvtunQNLtEQr7p2BnT5D4UHzymR3q6V9KiGfIbKkpe-RNo1e2I-a0YBu2foJfAcBR3_dwGreq6S_Tnn2MUo-ilu_BEIISItjiu1gCD5QmphamZM66QTrvCgLWZWyqpKhlmVeHjUeVCa7rmv0oZX5qSu7pjHlMauKxNYykyqTucpzmcsqPXX6UB4zrRpjTnmrxCHDUVuXOncdUx_6ZKVSF1mZycTpBh3dvupQR9FDs_QkDpmzxPQzjS07rPfViyL7e-X0ui2ZhHqEbxxsyxFrpx0hzJ4s2yvC-4AT-Ml93KxHsDqnC37cmVGyBFcPzHMstfmstzwsTdr6UchL7GO_PczB_4MtC3lZZyEhL-s4_wUAAP__bZNtXA">