void ASTExporter::VisitSwitchStmt()

in facebook-clang-plugins/libtooling/ASTExporter.h [3202:3221]


void ASTExporter<ATDWriter>::VisitSwitchStmt(const SwitchStmt *Node) {
  VisitStmt(Node);
  const Stmt *Init = Node->getInit();
  const DeclStmt *CondVar = Node->getConditionVariableDeclStmt();
  const bool IsAllEnumCasesCovered = Node->isAllEnumCasesCovered();
  ObjectScope Scope(OF, 2 + (bool)Init + (bool)CondVar + IsAllEnumCasesCovered);
  if (Init) {
    OF.emitTag("init");
    dumpPointer(Init);
  }
  if (CondVar) {
    OF.emitTag("cond_var");
    dumpStmt(CondVar);
  }
  OF.emitTag("cond");
  dumpPointer(Node->getCond());
  OF.emitTag("body");
  dumpPointer(Node->getBody());
  OF.emitFlag("is_all_enum_cases_covered", IsAllEnumCasesCovered);
}