[cfe-dev] Sema usage example
Chris Lattner
clattner at apple.com
Mon Nov 15 09:48:04 PST 2010
On Nov 15, 2010, at 7:04 AM, Tzafrir Rehan wrote:
> Hi all,
>
> Can anyone please point me at some code that uses the Sema interface?
Hi Tzafrir,
Sema is really a private interface used by the Parser to construct the AST. You probably don't want to interact with it directly.
> What I'd like to achieve at this point is a printout of all integer variables in the code and all mutations performed on them.
The best way to walk the AST is to write an ASTConsumer. With it, you can walk the AST and find all the integer variables etc.
-Chris
More information about the cfe-dev
mailing list