[cfe-commits] [PATCH] Fix pretty-printing of decl group stmts

Richard Membarth richard.membarth at informatik.uni-erlangen.de
Thu Oct 18 05:06:29 PDT 2012


Attached is a patch that fixes pretty-printing of decl stmt groups.

The example below shows that the current type pretty-printer does
not print the variable name if Policy.SuppressSpecifiers is set.

~ > cat test.cc
int main(int argc, const char **argv) {
    int x=0, y=5;
    for (int i=x, j=y; i<j; i++) {
        ;
    }
}

~ > clang -cc1 -ast-print test.cc
int main(int argc, const char **argv) {
    int x = 0,  = 5;
    for (int i = x,  = y; i < j; i++) {
        ;
    }
}

Please let me know if this is ok.

Richard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: decl_group_pretty_printer.patch
Type: text/x-diff
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121018/38b771ac/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121018/38b771ac/attachment.sig>


More information about the cfe-commits mailing list