// // Created by erki on 16.02.21. // #ifndef LLVM_PROTO_OPERATIONFINDER_HPP #define LLVM_PROTO_OPERATIONFINDER_HPP #include #include #include "OperationAnalyzer.hpp" class OperationFinder : public clang::ast_matchers::MatchFinder::MatchCallback { public: void addMatcher(clang::ast_matchers::MatchFinder& finder); virtual void run(const clang::ast_matchers::MatchFinder::MatchResult& result) override; private: void _processAssignment(const clang::ast_matchers::MatchFinder::MatchResult& result); void _processArithmetic(const clang::ast_matchers::MatchFinder::MatchResult& result); void _processCompoundStmt(const clang::ast_matchers::MatchFinder::MatchResult& result); void _processUnaryArithmetic(const clang::ast_matchers::MatchFinder::MatchResult& result); OperationAnalyzer _operation_analyzer; }; #endif //LLVM_PROTO_OPERATIONFINDER_HPP