I am migrating a libclang based tool to LibTooling and am a bit stumped on how to uniquely identify a named declaration when traversing the AST. Using libclang I could use clang_getCursorUSR to obtain the unified symbol but my digging through the docs for LibTooling so far has only turned up IdentifierInfo which doesn’t give anything unique between function overloads.
Could someone please point me in the right direction?
Just a follow-up: I found the required methods in the clang::index
namespace which is great but the other classes there bring up another
I see that I can utilise index::createIndexingAction to generate a
FrontendAction which will hand declarations off to an
At the moment I'm using a RecursiveASTVisitor which keeps a reference
to some state that can consist of declarations from multiple
translation units and overriding the HandleXXXXDecl methods there. It
seems that the IndexDataConsumer option might be a better fit, is
there any major reason for/against using it? There is very little
documentation so is it something relatively new?
Thanks for any help!