From b49c572ea1966e96b374451e21fd06818f40e9c4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 29 Jan 2019 22:58:28 +0000 Subject: [PATCH] NFC: Move GenericSelectionExpr dump to NodeDumper Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56961 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352558 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/TextNodeDumper.h | 1 + lib/AST/ASTDumper.cpp | 2 -- lib/AST/TextNodeDumper.cpp | 5 +++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/clang/AST/TextNodeDumper.h b/include/clang/AST/TextNodeDumper.h index d772d7f602..751a859b74 100644 --- a/include/clang/AST/TextNodeDumper.h +++ b/include/clang/AST/TextNodeDumper.h @@ -237,6 +237,7 @@ public: void VisitFloatingLiteral(const FloatingLiteral *Node); void VisitStringLiteral(const StringLiteral *Str); void VisitInitListExpr(const InitListExpr *ILE); + void VisitGenericSelectionExpr(const GenericSelectionExpr *E); void VisitUnaryOperator(const UnaryOperator *Node); void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node); void VisitMemberExpr(const MemberExpr *Node); diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index 03da41143f..fd0870d4e7 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -1467,8 +1467,6 @@ void ASTDumper::Visit(const GenericSelectionExpr::ConstAssociation &A) { } void ASTDumper::VisitGenericSelectionExpr(const GenericSelectionExpr *E) { - if (E->isResultDependent()) - OS << " result_dependent"; dumpStmt(E->getControllingExpr()); dumpTypeAsChild(E->getControllingExpr()->getType()); // FIXME: remove diff --git a/lib/AST/TextNodeDumper.cpp b/lib/AST/TextNodeDumper.cpp index 63e3184eab..bbe543668d 100644 --- a/lib/AST/TextNodeDumper.cpp +++ b/lib/AST/TextNodeDumper.cpp @@ -776,6 +776,11 @@ void TextNodeDumper::VisitInitListExpr(const InitListExpr *ILE) { } } +void TextNodeDumper::VisitGenericSelectionExpr(const GenericSelectionExpr *E) { + if (E->isResultDependent()) + OS << " result_dependent"; +} + void TextNodeDumper::VisitUnaryOperator(const UnaryOperator *Node) { OS << " " << (Node->isPostfix() ? "postfix" : "prefix") << " '" << UnaryOperator::getOpcodeStr(Node->getOpcode()) << "'"; -- 2.40.0