<p dir="ltr">Luis,<br>
My 2 cents. Maybe you can create a recursive visitor and use the VisitStmt method. Using a cast you can understand if it is an if statement and if yes you could call, for example,getThen() method or something similar.</p>
<p dir="ltr">What you mean with read/write variables?</p>
<p dir="ltr">I think you can understand if it is global or not taking the declaration point using something like getDecl() on the DeclRefExpr.</p>
<p dir="ltr">I'm sure that I said something wrong. Any better idea?</p>
<p dir="ltr">Thanks,<br>
Alberto</p>
<div class="gmail_quote">On 14 Jan 2015 15:44, "Luis Miguel Sanchez Garcia" <<a href="mailto:luismiguel.sanchez@uc3m.es">luismiguel.sanchez@uc3m.es</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I would like to develop a tool that prints the variables of a concrete loop/compount statement/etc. The information that I need to print for each variable is: </div><div>- read variables, write variables and rw variables</div><div>- And if it is local or global variable.</div><div><br></div><div>Any help to start?</div><div><br></div><div>Regards,<br></div><div>Luis.<br clear="all"><div><div><div dir="ltr">-- <br>-- <br>--------------------------------------------------<br>Luis Miguel Sánchez García<br><span style="border-collapse:collapse">Computer Architecture and Technology Area.</span><div>Office 2.2.B08<br><div>Computer Science Department. UNIVERSIDAD CARLOS III DE MADRID<br>Universidad Carlos III de Madrid<br>Avda. de la Universidad, 30<br>28911 Leganés - Madrid - Spain<br>e-mail: <a href="mailto:lmsan@arcos.inf.uc3m.es" target="_blank">lmsan@arcos.inf.uc3m.es</a><br> <a href="mailto:luismiguel.sanchez@uc3m.es" target="_blank">luismiguel.sanchez@uc3m.es</a><br><br></div><div>Phone: <a href="tel:%28%2B34%29%2091%20624%205951" value="+34916245951" target="_blank">(+34) 91 624 5951</a><br><div> <br>Linked-In: <a href="http://es.linkedin.com/in/lmsan" style="color:rgb(17,85,204)" target="_blank">http://es.linkedin.com/in/lmsan</a><br>Twitter: <a href="http://twitter.com/lmsanchezgarcia" style="color:rgb(17,85,204)" target="_blank">http://twitter.com/lmsanchezgarcia</a><br>--------------------------------------------------</div></div></div></div></div></div>
</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div>