]> granicus.if.org Git - clang/commitdiff
NFC: Move GenericSelectionExpr dump to NodeDumper
authorStephen Kelly <steveire@gmail.com>
Tue, 29 Jan 2019 22:58:28 +0000 (22:58 +0000)
committerStephen Kelly <steveire@gmail.com>
Tue, 29 Jan 2019 22:58:28 +0000 (22:58 +0000)
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
lib/AST/ASTDumper.cpp
lib/AST/TextNodeDumper.cpp

index d772d7f60267f5541d52b40a8de31f2d91026656..751a859b746d46bab154b55756e9162e58a6b8ca 100644 (file)
@@ -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);
index 03da41143fa530435ae401abac25c5afcd1c3882..fd0870d4e743735d722ada3d8a397ccc2cadc031 100644 (file)
@@ -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
 
index 63e3184eab85c738d003c623a4f9c113f60f2014..bbe543668d16ed901de7cc756f1a463863d8ce5a 100644 (file)
@@ -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()) << "'";