<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi there <div><br></div><div>I am using clang to instrument code t<span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">o print out all assignment statements that are relevant to formal variables. </span></div><div><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">I implement ASTConsumer and </span>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. </div><div><br></div><div>For example: an expression-> x = y + z; </div><div>I want to get x and (y+z) , then decompose y+z to y z and + </div><div><br></div> <div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre;">How could I do that? </span></font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></div><div><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre;">Thank you very much. </span></font></div><div><span class="Apple-style-span" style="font-family: monospace; white-space: pre; ">- Sirinda</span></div></body></html>