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
llvm-svn: 348714
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp
index bdbc562..1ac604b 100644
--- a/clang/lib/AST/ASTDumper.cpp
+++ b/clang/lib/AST/ASTDumper.cpp
@@ -1979,16 +1979,16 @@
}
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) {