1 //==- CFGRecStmtVisitor - Recursive visitor of CFG statements ---*- C++ --*-==//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the template class CFGRecStmtVisitor, which extends
11 // CFGStmtVisitor by implementing a default recursive visit of all statements.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_ANALYSIS_CFG_REC_STMT_VISITOR_H
16 #define LLVM_CLANG_ANALYSIS_CFG_REC_STMT_VISITOR_H
18 #include "clang/Analysis/Visitors/CFGStmtVisitor.h"
21 template <typename ImplClass>
22 class CFGRecStmtVisitor : public CFGStmtVisitor<ImplClass,void> {
25 void VisitStmt(Stmt* S) {
26 static_cast< ImplClass* >(this)->VisitChildren(S);
29 // Defining operator() allows the visitor to be used as a C++ style functor.
30 void operator()(Stmt* S) { static_cast<ImplClass*>(this)->BlockStmt_Visit(S);}
33 } // end namespace clang