LLVM Discussion Forums

Suppress warnings in included files

I work in a code base where I do not own most files. When editing a file that I am responsible for, I see several a warning at the include statement to a header file owned by another team, which I have no control over. I would like to only see warnings caused in the currently opened file and hide warnings from included headers. Is this currently possible?

If relevant, I am using Neovim with LanguageClient-neovim.

Unfortunately there is no way to disable that currently, but clangd only surfaces diagnostics with at least “error” severity from headers (i.e. the ones that would result in a compilation failure, so they need to be fixed to get a build no matter who owns the code).
If that’s not the case please file a bug at https://github.com/clangd/clangd/issues/ with more details so that we can figure out what’s wrong.