[PATCH] D55398: Re-order content from InitListExpr
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 6 16:11:56 PST 2018
steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a subscriber: cfe-commits.
This causes no change in the output of ast-dump-stmt.cpp due to the way
child nodes are printed with a delay.
Repository:
rC Clang
https://reviews.llvm.org/D55398
Files:
lib/AST/ASTDumper.cpp
Index: lib/AST/ASTDumper.cpp
===================================================================
--- lib/AST/ASTDumper.cpp
+++ 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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55398.177079.patch
Type: text/x-patch
Size: 696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181207/fc882404/attachment.bin>
More information about the cfe-commits
mailing list