Issue 75707
Summary clangd: Included header `<concepts>` incorrectly identified as unused
Labels new issue
Assignees
Reporter wangtz0607
    ## Example

```cpp
#include <concepts>

static_assert(std::same_as<int, int>);
```

## Actual Behavior

![](https://github.com/llvm/llvm-project/assets/25856391/717c6de5-b8fd-41cc-a26f-20073990004c)

Changing `std::same_as` to other concepts defined in `<concepts>` such as `std::derived_from` and `std::convertible_to` yields the same behavior.

## Expected Behavior

`<concepts>` should not be identified as "not used directly" due to the presence of `std::same_as`.

## Environment

**`clangd --version`**:

```
clangd version 17.0.6
Features: linux
Platform: x86_64-unknown-linux-gnu
```

**Compiler flags specified in `compile_commands.json`**: `-std=c++20`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to