libclang has many configuration options, e.g. it had a now-deprecated option CXTranslationUnit_SkipFunctionBodies when it would ignore function bodies (actually, I found it enough for "rough" index - so you know if the symbol is even visible in particular TU. And every indexer worker would be a compiler - so it is easily parallelizable.
Note that libclang can provide you lists of completions - and it is fairly fast at it, even though it essentially reparses the TU. It has some optimizations like "precompiling" the headers for the edited files.
IMHO, the best showcase of the libclang is Xcode though YouCompleteMe for vim and SublimeClang can be used to try it out as well.
Clang's parsing is indeed significantly slower than the CDT one, on order of 5-6 seconds for a typical source file of few hundred lines. Indexing would be particularly sensitive to parsing slowness since it would bring us back to the days of full indexer. One possible solution to this problem is parsing of many source files in parallel.
-sergey
_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/cdt-dev
|