Explorar o código

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
Stephen Kelly %!s(int64=6) %!d(string=hai) anos
pai
achega
b49c572ea1
Modificáronse 3 ficheiros con 6 adicións e 2 borrados
  1. 1 0
      include/clang/AST/TextNodeDumper.h
  2. 0 2
      lib/AST/ASTDumper.cpp
  3. 5 0
      lib/AST/TextNodeDumper.cpp

+ 1 - 0
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);

+ 0 - 2
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
 

+ 5 - 0
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()) << "'";