[cfe-dev] -parse-ast-view

Chris Lattner clattner at apple.com
Wed Sep 19 17:39:12 PDT 2007

On Sep 19, 2007, at 5:24 PM, Chris Lattner wrote:

> FYI, with Ted's latest changes, we can now use -parse-ast-view to  
> look at ASTs.  If you have graphviz set up right, you should see  
> something like this:

BTW, in order for this to work, you have to have dot or Graphviz  
installed correctly, instructions are here:

One of the nice things about this is that you can just use things  
like "call S->viewAST()" in GDB and a window pops up with the  
subgraph for S.


> <pastedGraphic.png>
> for
> void foo(int *P, int N) {
>   for (int i = 0; i != N; ++i)
>     P[i] = N;
> }
> nifty!
> Over time, more info will be added to the nodes.
> -Chris

More information about the cfe-dev mailing list