[PATCH] D16438: Fix printing of nested variable declarations with suppressed tags

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 23:19:14 PST 2016


rsmith added inline comments.

================
Comment at: lib/AST/StmtPrinter.cpp:132
@@ -131,2 +131,3 @@
   SubPolicy.SuppressSpecifiers = false;
+  SubPolicy.SuppressTag = false;
   Decl::printGroup(Decls.data(), Decls.size(), OS, SubPolicy, IndentLevel);
----------------
Maybe we should instead do this whenever we start printing a variable's initializer? I don't think your patch will fix the same bug in this case:

    struct X {};
    struct { int n; } x = { [](struct X *x) { return 0; }(0) };


http://reviews.llvm.org/D16438





More information about the cfe-commits mailing list