27 lines
703 B
C++
27 lines
703 B
C++
//
|
|
// Created by erki on 16.02.21.
|
|
//
|
|
|
|
#ifndef LLVM_PROTO_OPERATIONFINDER_HPP
|
|
#define LLVM_PROTO_OPERATIONFINDER_HPP
|
|
|
|
#include <clang/ASTMatchers/ASTMatchFinder.h>
|
|
|
|
#include "OperationLog.hpp"
|
|
|
|
class OperationFinder
|
|
{
|
|
public:
|
|
explicit OperationFinder(IOperationOutput* storage);
|
|
|
|
void processArithmetic(const clang::BinaryOperator* op, const clang::SourceManager& source_manager);
|
|
void processUnaryArithmetic(const clang::UnaryOperator* op, const clang::SourceManager& source_manager);
|
|
|
|
private:
|
|
void _processExpressionTypes(OperationLog& log, const clang::Expr* source, const clang::Expr* op1, const clang::Expr* op2);
|
|
|
|
IOperationOutput* _storage;
|
|
};
|
|
|
|
#endif //LLVM_PROTO_OPERATIONFINDER_HPP
|