This patch just exposes ParsedSrcLocationsTracker in libIndex.
In https://reviews.llvm.org/D66125 we originally discussed possibility of wrapping this in some simpler API. Unfortunately I don't see a way how to do that as the primary use-case is multi-threaded indexing via libclang.
The way this works is that libclang client keeps shared state of what has already been indexed and pass it to libclang functions it calls. I. e. we need to preserve some state and need to deal with synchronization - this is the purpose of SharedParsedRegionsStorage.
We also need access to preprocessor which we get only in CreateASTConsumer() of relevant frontend action. I. e. we need to store this reference (plus reference to PPConditionalDirectiveRecord) somewhere (currently ParsedSrcLocationsTracker).
I don't see a way how to make this much simpler but open to ideas! (Also, not entirely happy with naming - suggestions are welcome.)