HighCommander4 wrote:

> The problem stems from the way clangd's background indexer works: every file, 
> including headers, gets its own shard, and a header included by several 
> source files will only get its shard written the **first** time it's 
> processed as part of a source file.

This seems like a pretty fundamental aspect of the background indexer's 
performance, so I don't think we can change this.

> Since symbols representing instantiations of class templates are stored in 
> the shard of the file containing the template definition [...]

Therefore, I think that this is what will need to change: symbols representing 
instantiations of class templates will need to be stored in the shard of the 
file containing the point of instantiation.

The details of what that might look like will need to be ironed out, but 
hopefully that's a starting point for a high-level direction for a fix.

https://github.com/llvm/llvm-project/pull/177273
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to