[clangd] auto including internal header when using `unreachable`
Open
clang-include-cleaner
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
When auto completing `unreachable`, clangd auto includes `__stddef_unreachable.h`, even if `stddef.h` is already included.
```C
#include <__stddef_unreachable.h>
#include
void foo()
{
unreachable();
}
```
Contributor guide
Research direction
Start in clangd's auto-completion and include-insertion behavior, reproducing the example with __stddef_unreachable.h followed by stddef.h. Trace how unreachable is resolved when stddef.h is already present. Done means completion no longer adds the internal header in this case, while the existing unreachable completion still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100