// // Created by erki on 02.03.21. // #ifndef C_ANALYZER_OPERATIONFINDERASTVISITOR_HPP #define C_ANALYZER_OPERATIONFINDERASTVISITOR_HPP #include class OperationFinder; class OperationFinderAstVisitor : public clang::RecursiveASTVisitor { public: explicit OperationFinderAstVisitor(OperationFinder* op_finder); void NewContext(clang::ASTContext* context); bool VisitForStmt(clang::ForStmt* stmt); bool VisitBinaryOperator(clang::BinaryOperator* op); bool VisitUnaryOperator(clang::UnaryOperator* op); bool dataTraverseStmtPre(clang::Stmt* stmt); bool dataTraverseStmtPost(clang::Stmt* stmt); private: clang::ASTContext* _context; OperationFinder* _op_finder; }; #endif //C_ANALYZER_OPERATIONFINDERASTVISITOR_HPP