[clangd-dev] Multi-project workflow via multiple CDBs

Nathan Ridge via clangd-dev clangd-dev at lists.llvm.org
Thu Jan 10 16:06:36 PST 2019


Thanks for the info! I was aware of the auto-index functionality, but didn't know that it already supported multiple CDBs.

> Then if you've just files open from source/bar directory in your clangd instance, 
> it won't become aware of the other compilation database that lies in libfoo and 
> only give you declaration for Multiply, but if you open any source file under 
> source/libfoo (not necessarily libfoo/foo.cpp itself) clangd will be able to index 
> that directory as well and start giving you definition location for Multiply as well. 
> (You also need to #include "foo.h" in foo.cpp but I assume that was unintentional.)
>
> Does that sound good?

It sounds very good!

Out of curiosity, though - if a client wanted to send all the CDBs upfront, to avoid the requirement that you have to open a file from each project, would that be a reasonable capability to add?

Thanks,
Nate


More information about the clangd-dev mailing list