[cfe-commits] [PATCH] Terse output mode for DeclPrinter and lots of tests

Dmitri Gribenko gribozavr at gmail.com
Fri Aug 17 17:49:39 PDT 2012


Hello,

The attached patch adds a flag
PrintingPolicy::DontRecurseInDeclContext to provide "terse" output
from DeclPrinter.  The motivation is to use DeclPrinter to print
declarations in user-friendly format, without overwhelming user with
inner detail of the declaration being printed.

This patch also adds many tests for DeclPrinter.  There are quite a
few things that we print incorrectly: search for WRONG in test file --
and these tests check our output against incorrect output, so that we
can fix/refactor/rewrite the DeclPrinter later.

Please review.

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>*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: terse-decl-printer-v1.patch
Type: application/octet-stream
Size: 36252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120817/fcf01173/attachment.obj>


More information about the cfe-commits mailing list