<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div style="-webkit-text-size-adjust: auto; ">On Dec 25, 2012, at 5:40 PM, Mohammad Adil <<a href="mailto:madil90@gmail.com">madil90@gmail.com</a>> wrote:</div><div style="-webkit-text-size-adjust: auto; "><br></div><blockquote type="cite" style="-webkit-text-size-adjust: auto; "><div><div dir="ltr">Hi,<div style="">   I believe that the problem comes when the stmtprinter handles expressions. All statements which are not expressions are printed fine while statements which are also expressions (a = 1;) do not have a semicolon(;) at the end. </div></div></div></blockquote><div style="-webkit-text-size-adjust: auto; "><br></div><span style="-webkit-text-size-adjust: auto;">Right. You'll likely need to add some context to the pretty printer so that it will add the ; to expressions in a statement context. </span><div style="-webkit-text-size-adjust: auto; "><br><blockquote type="cite"><div><div dir="ltr"><div style="">Please tell me the procedure to submit a patch fix? I will be very happy to contribute.</div></div></div></blockquote><div><br></div><div>There is some documentation here:</div><div><br></div><span style="font-family: '.HelveticaNeueUI'; font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); -webkit-text-size-adjust: none; "><a href="http://llvm.org/docs/DeveloperPolicy.html#making-a-patch">http://llvm.org/docs/DeveloperPolicy.html#making-a-patch</a></span></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></font></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">Clang patches should go to cfe-commits. Thanks!</span></font></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></font></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);">  - Doug</span></font></div><div><font face=".HelveticaNeueUI"><span style="font-size: 15px; line-height: 19px; white-space: nowrap; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.292969); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469);"><br></span></font><blockquote type="cite" style="-webkit-text-size-adjust: auto; "><div><div dir="ltr"><div style="">Regards,</div><div style="">Adil</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 26, 2012 at 3:18 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Sent from my iPhone<br>
<br>
On Dec 25, 2012, at 1:57 PM, madil90 <<a href="mailto:madil90@gmail.com">madil90@gmail.com</a>> wrote:<br>
<br>
> Hi,<br>
>   When using prettyPrint (or Rewriter::ConverToString()) to print a<br>
> statement, clang prints some statements with ";" and some without it. The<br>
> statement "int a,b;" is printed as it is while the statement "a--;" is<br>
> printed as "a--" omitting the ";" at the end. How can I tell which<br>
> statements retain ";" and which statements omit it. Is there any special<br>
> reason for not including ";" in some statements?<br>
<br>
I consider this a bug. All statements that need a semicolon should print one. Can I interest you in submitting a patch to fix this?<br>
<br>
  - Doug<br>
<br>
> Regards,<br>
> Adil<br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/prettyprint-statement-tp4029182.html" target="_blank">http://clang-developers.42468.n3.nabble.com/prettyprint-statement-tp4029182.html</a><br>

> Sent from the Clang Developers mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mohammad Adil<div>LUMS SSE</div>
</div>
</div></blockquote></div></body></html>