[cfe-dev] libclang/Index.h Question

Luke Carmichael lukedouglascarmichael at gmail.com
Tue May 31 18:25:07 PDT 2011


Hopefully this is the correct list to post to.
I am attempting to use libclang/Index.h to do code completion.
It works great. Thanks!
Now I want to serialize/deserialize the CXTranslationUnit to save parse time.
I use clang_saveTranslationUnit to serialize and
clang_createTranslationUnit to deserialize.
This seems to work if I use Visitors as used in c-index-test.c, it
prints out function info etc.
However, using that deserialized CXTranslationUnit does not work with
clang_codeCompleteAt.
I suspect that the serialization is not fully implemented as the
CompilerInvocation is not initialized in ASTUnit::CodeComplete.
Is this true or am I using the library incorrectly?
If full serialization is not implemented, will this be implemented in
the future? Is it a large task?
Thanks
Luke



More information about the cfe-dev mailing list