<div dir="ltr"><div><div><div><div>Hi,<br></div>You can use the isa<> operator to check if the pointer to a statement is an instance of a specified class. For example:<br></div>    if (isa<ForStmt>(S)) { }<br><br>
</div>Take a look at <a href="http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates">http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates</a> for more info.<br></div>Alex<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-22 4:48 GMT-07:00 Greenwalker <span dir="ltr"><<a href="mailto:panagos13@hotmail.com" target="_blank">panagos13@hotmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
Given an Stmt is it possible to identify if it is member of one (or<br>
multiple) ForStmt / WhileStmt ?<br>
<br>
Thanks :)<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Identify-whether-Stmt-is-member-of-a-ForStmt-WhileStmt-tp4040690.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Identify-whether-Stmt-is-member-of-a-ForStmt-WhileStmt-tp4040690.html</a><br>

Sent from the Clang Developers mailing list archive at Nabble.com.<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>
</blockquote></div><br></div>