[cfe-dev] libTooling Questions
Jens Weller
JensWeller at gmx.de
Sun Aug 12 08:54:00 PDT 2012
Hi Clang-devs,
just started to play around with libTooling, a few (C++ related) Questions...
As far as I understand, I can access the AST with LibTooling, retrieving f.e. all Function Names and beeing able to make changes to the ast.
This works over the Visitor and FrontendAction classes.
So, I understand how to implement tools which do transformations or rename things in the code, or generate statistics.
What I have yet not found, is kind of a Document Model for C++ files, which I'm actually looking for:
I'd like to be able to display the whole ast (or more precise, namespaces, classes, members of them), so I would need to have access to the ast nodes, instead of visiting selected ones.
Where to look for this, is libAst the right place?
http://clang.llvm.org/docs/InternalsManual.html#libast
As far as I understand, in LibTooling ASTContext provides information about the current location in the ast to the visitor.
So, where to start, if you need an document like interface for a C++ File in clang?
kind regards,
Jens Weller
More information about the cfe-dev
mailing list