26 lines
624 B
C++
26 lines
624 B
C++
//
|
|
// Created by erki on 24.02.21.
|
|
//
|
|
|
|
#include "OperationFinderConsumer.hpp"
|
|
|
|
OperationFinderConsumer::OperationFinderConsumer()
|
|
{
|
|
_op_finder.addMatcher(_ast_finder);
|
|
}
|
|
|
|
void OperationFinderConsumer::HandleTranslationUnit(clang::ASTContext& context)
|
|
{
|
|
//_ast_finder.matchAST(context);
|
|
auto consumer = _ast_finder.newASTConsumer();
|
|
|
|
consumer->HandleTranslationUnit(context);
|
|
}
|
|
|
|
std::unique_ptr<clang::ASTConsumer> OperationFinderAction::CreateASTConsumer(
|
|
clang::CompilerInstance& compiler, llvm::StringRef in_file)
|
|
{
|
|
return std::unique_ptr<clang::ASTConsumer>(
|
|
new OperationFinderConsumer());
|
|
}
|