From 34ab31b28e583e023d050cba23b44d3d19639f5f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 9 Dec 2018 13:15:18 +0000 Subject: [PATCH] Re-order content from InitListExpr Summary: This causes no change in the output of ast-dump-stmt.cpp due to the way child nodes are printed with a delay. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D55398 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348714 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTDumper.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index bdbc562df7..1ac604b179 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -1979,16 +1979,16 @@ void ASTDumper::VisitStringLiteral(const StringLiteral *Str) { } void ASTDumper::VisitInitListExpr(const InitListExpr *ILE) { + if (auto *Field = ILE->getInitializedFieldInUnion()) { + OS << " field "; + NodeDumper.dumpBareDeclRef(Field); + } if (auto *Filler = ILE->getArrayFiller()) { dumpChild([=] { OS << "array filler"; dumpStmt(Filler); }); } - if (auto *Field = ILE->getInitializedFieldInUnion()) { - OS << " field "; - NodeDumper.dumpBareDeclRef(Field); - } } void ASTDumper::VisitUnaryOperator(const UnaryOperator *Node) { -- 2.40.0