I'm looking at developing a FOSS tool for GNU/Emacs, written in C++, that makes use of clang's powerful features. In particular I'm interested in contextual/semantic aware code-completion and extraction of information (ie. list of methods, attributes, etc). IOW, something similar to what CEDET  does, only much faster, reliable and useful.
I've created a simple program that accesses all of a C/C++ source file's symbols using the AST-consumer approach, but I'm not quite sure I'm pursuing the right approach, given the requirements above.
What would be the right approach for:
* implementing code-completion? Should I be looking at using the clang::CodeComplete*  set of classes? If so, how would one go about implementing the CodeCompleteConsumer class?
* extracting contextual aware information? For instance, extracting the list of methods of an arbitrary class.
* caching of parsed source file data? For instance, if one is editing file A and it includes B, C and D headers, it would be great if clang could be instructed to only reload/reparse file A and not the others for obvious performance reasons.