While working with clangd, I found that the index was next to the sources files of the project.
When updating clang, there are clangd errors because I’ve updated from clangd 9 to 10:
E[23:38:12.781] Background-index: Couldn't read [...]\LLVM\lib\clang\9.0.0\include\inttypes.h to validate stored index: no such file or directory
Obviously this folder doesn’t exists as in that folder there is LLVM 10 now (it replaced the previous version).
I see some threads talking about a centralized clangd index for a project, but I think this is not possible for all situation, especially when changing the compiler, the clangd version or using multiple out of sources build directories from one single source directory.
I guess the clangd index should include all included files hash to the hash it puts behind file names like this:
I guess the hash is made on the source file itself only as of now, that would explain why clangd 10 sees reference to headers of clang 9.
Could this be fixed ?