Open zhang-stephen opened 8 months ago
@llvm/issue-subscribers-clangd
Author: Stephen Zhang (zhang-stephen)
Works for me on Linux.
Works for me on Linux.
it's only reproduced on macOS. I have already tried to reproduce it in WSL ubuntu, but failed.
and I have tried // IWYU pragma: export
, it does not work for me, the include line still be marked as unused.
as title said, reproduce it with following steps:
.clangd
configuration as following:If: PathMatch: .*.[ch]{1}
CompileFlags: Add: [-xc, -std=c11] Remove: [-xc++] Compiler: clang
Diagnostics: UnusedIncludes: Strict MissingIncludes: Strict
foo.h
, just include thedummy.h
, nothing else to dounused-includes
, and this is expectedfoo.h
, it looks like:unused-includes
would be suppressed, but on macOS, it CANNOT be suppressed. there is a screenshot for similiar scenario:Environment: LLVM: 17.0.6 Windows: Windows 11 x64 23H2 MacOS: MacOS 14.3 Apple Silicon