[cfe-dev] AST nodes with examples showing what they are?

Nikola Smiljanic popizdeh at gmail.com
Thu Aug 6 00:16:19 PDT 2015


What exactly do you mean by "trigger it"?

Looking at the inheritance diagram should give you a good idea about what
each node represents. NamedDecl is a base class for all declarations that
have a name. So for example:

int x; // variable declaration VarDecl that's also a NamedDecl
foo: // label LabelDecl that's also a NamedDecl
namespace bar {} // you get the idea

On Thu, Aug 6, 2015 at 3:33 PM, Hayden Livingston <halivingston at gmail.com>
wrote:

> The Clang AST is great, but it's a bit tedious to look at at a node
> and then try to find a suitable piece of C++ code to trigger it.
>
> Does anyone know of an easier way to play with the AST? For example
> documentation or such that says NamedDecl -> and here is how to create
> a NamedDecl in C++?
>
> And then I'm also sometimes lost on what can appear inside a Node,
> i.e. a Decl node can have VarDecl and that can have a
> CXXConstructExpr, etc.
>
> Even if some of you have tips to share, that'd be great.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150806/b2c98cb2/attachment.html>


More information about the cfe-dev mailing list