r348714 - Re-order content from InitListExpr
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 9 05:15:18 PST 2018
Author: steveire
Date: Sun Dec 9 05:15:18 2018
New Revision: 348714
URL: http://llvm.org/viewvc/llvm-project?rev=348714&view=rev
Log:
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
Modified:
cfe/trunk/lib/AST/ASTDumper.cpp
Modified: cfe/trunk/lib/AST/ASTDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDumper.cpp?rev=348714&r1=348713&r2=348714&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDumper.cpp (original)
+++ cfe/trunk/lib/AST/ASTDumper.cpp Sun Dec 9 05:15:18 2018
@@ -1979,16 +1979,16 @@ void ASTDumper::VisitStringLiteral(const
}
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) {
More information about the cfe-commits
mailing list