[cfe-commits] r170606 - in /cfe/trunk: include/clang/AST/PrettyPrinter.h lib/AST/DeclPrinter.cpp tools/libclang/CXComment.cpp unittests/AST/DeclPrinterTest.cpp

Dmitri Gribenko gribozavr at gmail.com
Wed Dec 19 15:59:12 PST 2012


On Thu, Dec 20, 2012 at 1:54 AM, jahanian <fjahanian at apple.com> wrote:
>
> On Dec 19, 2012, at 3:41 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> I don't really understand the motivation behind this condition.
>
> This is because, when -ast-print  ';' is added as part of going over the
> entire DeclContext and
> printing each of its containing declarations (see VisitDeclContext). While
> from
> the declaration tag, we are printing individual declarations. I noticed that
> we were adding two ';' with ast-print after my recent change.

I see.  Thanks for the explanation!

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-commits mailing list