From 15922af7fa3abaf9e293386f58e6c20ec816a2dd Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 10 Dec 2018 21:20:05 +0000 Subject: [PATCH] Revert "Change InitListExpr dump to label and pointer" This reverts commit r348794. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348799 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTDumper.cpp | 9 ++++----- test/AST/ast-dump-stmt.cpp | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index 60c04e4eb7..8137c81d0c 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -1963,12 +1963,11 @@ void ASTDumper::VisitInitListExpr(const InitListExpr *ILE) { OS << " field "; NodeDumper.dumpBareDeclRef(Field); } - if (auto *Filler = ILE->getArrayFiller()) { - OS << " array_filler"; - NodeDumper.dumpPointer(Filler); - - dumpStmt(Filler); + dumpChild([=] { + OS << "array filler"; + dumpStmt(Filler); + }); } } diff --git a/test/AST/ast-dump-stmt.cpp b/test/AST/ast-dump-stmt.cpp index 8548da72d1..671bdd6454 100644 --- a/test/AST/ast-dump-stmt.cpp +++ b/test/AST/ast-dump-stmt.cpp @@ -90,8 +90,9 @@ void TestUnionInitList() { U us[3] = {1}; // CHECK: VarDecl {{.+}} col:5 us 'U [3]' cinit -// CHECK-NEXT: `-InitListExpr {{.+}} 'U [3]' array_filler 0x{{.+}} -// CHECK-NEXT: |-InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' +// CHECK-NEXT: `-InitListExpr {{.+}} 'U [3]' +// CHECK-NEXT: |-array filler +// CHECK-NEXT: | `-InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-InitListExpr {{.+}} 'U' field Field {{.+}} 'i' 'int' // CHECK-NEXT: `-IntegerLiteral {{.+}} 'int' 1 } -- 2.40.0