[cfe-dev] A newbie question on getting operator in Expr
Sirinda Palahan
sxp969 at psu.edu
Thu Jun 16 12:18:25 PDT 2011
Hi there
I am using clang to instrument code to print out all assignment
statements that are relevant to formal variables.
I implement ASTConsumer and StmtVisitor to visit Stmt, especially
Expr. Right now I can get all expressions in a code. What I want to do
is to check if the expression contains an assignment operator. If it
does, I would like to get LHS and RHS of the expression to see if
there is any formal variables in it.
For example: an expression-> x = y + z;
I want to get x and (y+z) , then decompose y+z to y z and +
How could I do that?
Thank you very much.
- Sirinda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110616/e5601c96/attachment.html>
More information about the cfe-dev
mailing list