-`clangd` also tries to introspect the compiler specified to figure out what include paths it adds implicitly. Usually it just checks the relative path, following clang (and maybe others') conventions. Iff you use the `--query-driver` flag it will directly invoke the compiler and ask it about those includes If you don't specify `--query-driver` and it can't find the includes at the relative path (like in the case of Bazel's compiler wrappers) it will miss those default includes. If you're seeing red squigglies under, e.g., standard library headers or system headers that should be included by default, you've probably run into a failure of this type. [[For more context, see this issue about making driver automatic.](https://github.com/clangd/clangd/issues/539)]
0 commit comments