Hi,<div>   I need to rewrite at the end of line. In order for the edited code to compile, I must ensure that I write after a ";" character. I just need to find that character. I have a ParentMap that has all the statements. How can I figure out which type of statements have a ";" at the end and which don't? (I just need to differentiate these two types)</div>
<div><br></div><div>Regards,</div><div>Adil</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 17, 2012 at 2:09 AM, Mohammad Adil <span dir="ltr"><<a href="mailto:madil90@gmail.com" target="_blank">madil90@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div>   I think I didn't state my question correctly. I meant that is there some way to visit statements that end with ";" and are executed in one execution cycle. I just want to identify whether a statement started after a ";" and ended with a ";". e.g.</div>

<div><br></div><div>int a;</div><div class="im"><div><br></div><div>a = a + 2;</div><div><br></div></div><div>   I only want to visit these two lines. How can I tell these two statements apart from things like DeclRefExpr which need to have a parent statement that includes them (DeclRefExpr is not a statement type that can be executed)</div>

<div><br></div><div>Regards,</div><div>Adil</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Sat, Nov 17, 2012 at 1:59 AM, Yang Chen <span dir="ltr"><<a href="mailto:chenyang@cs.utah.edu" target="_blank">chenyang@cs.utah.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">madil90 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
  I need to identify statements that end with ";". I mean, how does clang<br>
represent a statement that is executed independently e.g.<br>
  <br>
</blockquote>
<br>
You can check all statement classes here:<br>
<br>
<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html" target="_blank">http://clang.llvm.org/doxygen/<u></u>classclang_1_1Stmt.html</a><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
int a;    // what type of statement is this?<br>
  <br>
</blockquote>
<br>
I assume you define ``a'' as a local variable, then ``int a;'' is a DeclStmt.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
a = a + 2;   // or this?<br>
  <br>
</blockquote>
<br>
It's a BinaryOperator -<br>
<br>
<a href="http://clang.llvm.org/doxygen/classclang_1_1BinaryOperator.html" target="_blank">http://clang.llvm.org/doxygen/<u></u>classclang_1_1BinaryOperator.<u></u>html</a><br>
<br>
- Yang<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Regards,<br>
Adil<br>
<br>
<br><span><font color="#888888">
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/Statements-that-end-with-tp4028311.html" target="_blank">http://clang-developers.42468.<u></u>n3.nabble.com/Statements-that-<u></u>end-with-tp4028311.html</a><br>


Sent from the Clang Developers mailing list archive at Nabble.com.<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/cfe-dev</a><br>
  <br>
</font></span></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Mohammad Adil<div>LUMS SSE</div><br>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Mohammad Adil<div>LUMS SSE</div><br>
</div>