i’d like to use CLang to parse c++ files to AST. The examples from https://github.com/loarabia/Clang-tutorial look nice, but I don’t see any parsing to a structure that would hold the whole parsed AST (i.e. comparable to the DOM tree/document generated by DOM-based XML parsers). Instead, what I see is an event-based parsing API (comparable to SAX for XML parsers) where I subclass clang::ASTConsumer and my class gets events and has to store the tree structure itself somehow.
So before i do that (and probably re-invent the wheel in the process), I thought I’d better ask: is there some default tree structure that would save the whole parsed AST and that i can keep and use after the parsing is done (i.e. the AST equivalent of a DOM/XML DomDocument) and some easy way to automatically get that structure filled with the whole AST tree instead of getting events?