Skip to content

Commit b3c16ea

Browse files
committed
AST: Tweak printing of PackType and PackExpansionType
1 parent d9cf85d commit b3c16ea

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3729,18 +3729,16 @@ namespace {
37293729
printField("num_elements", T->getNumElements());
37303730
Indent += 2;
37313731
for (Type elt : T->getElementTypes()) {
3732-
OS.indent(Indent) << "(";
37333732
printRec(elt);
3734-
OS << ")";
37353733
}
37363734
Indent -= 2;
37373735
PrintWithColorRAII(OS, ParenthesisColor) << ')';
37383736
}
37393737

37403738
void visitPackExpansionType(PackExpansionType *T, StringRef label) {
37413739
printCommon(label, "pack_expansion_type");
3742-
printField("pattern", T->getPatternType());
3743-
printField("count", T->getCountType());
3740+
printRec("pattern", T->getPatternType());
3741+
printRec("count", T->getCountType());
37443742
PrintWithColorRAII(OS, ParenthesisColor) << ')';
37453743
}
37463744

lib/AST/ASTPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5548,7 +5548,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
55485548
}
55495549

55505550
void visitPackType(PackType *T) {
5551-
Printer << "(";
5551+
Printer << "Pack{";
55525552

55535553
auto Fields = T->getElementTypes();
55545554
for (unsigned i = 0, e = Fields.size(); i != e; ++i) {
@@ -5557,7 +5557,7 @@ class TypePrinter : public TypeVisitor<TypePrinter> {
55575557
Type EltType = Fields[i];
55585558
visit(EltType);
55595559
}
5560-
Printer << ")";
5560+
Printer << "}";
55615561
}
55625562

55635563
void visitPackExpansionType(PackExpansionType *T) {

0 commit comments

Comments
 (0)