<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 19, 2012, at 3:41 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite"><br><br>     Out << "}\n";<br><br>   }<br>-  Out << ' ' << PDecl->getType().getAsString(Policy) << ' ' << *PDecl << ';';<br>+  Out << ' ' << PDecl->getType().getAsString(Policy) << ' ' << *PDecl;<br>+  if (Policy.PolishForDeclaration)<br>+    Out << ';';<br> }<br></blockquote><br>I don't really understand the motivation behind this condition.<br></blockquote><div><br></div>This is because, when -ast-print  ';' is added as part of going over the entire DeclContext and </div><div>printing each of its containing declarations (see <span style="font-family: Menlo; font-size: 11px; ">VisitDeclContext). While from</span></div><div><font face="Menlo"><span style="font-size: 11px;">the declaration tag, we are printing individual declarations. I noticed that</span></font></div><div><font face="Menlo"><span style="font-size: 11px;">we were adding two ';' with ast-print after my recent change.</span></font></div><div><font face="Menlo"><span style="font-size: 11px;">- Fariborz</span></font></div><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font><blockquote type="cite"><br>Dmitri<br><br>-- <br>main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br></blockquote></div><br></body></html>