1#ifndef ASTBUILDER_ACTION_HPP_
2#define ASTBUILDER_ACTION_HPP_
7#include "clang/Frontend/ASTUnit.h"
8#include "clang/Frontend/CompilerInstance.h"
9#include "clang/Frontend/CompilerInvocation.h"
10#include "clang/Serialization/PCHContainerOperations.h"
11#include "clang/Tooling/Tooling.h"
16class DiagnosticConsumer;
26 std::unique_ptr<clang::ASTUnit>&
AST;
27 const clang::tooling::CompilationDatabase&
db;
28 std::filesystem::path
file;
33 const clang::tooling::CompilationDatabase&
db,
34 const std::filesystem::path& filename,
35 const std::filesystem::path&
tmpdir)
42 bool runInvocation(std::shared_ptr<clang::CompilerInvocation> Invocation,
43 clang::FileManager* Files,
44 std::shared_ptr<clang::PCHContainerOperations> PCHContainerOps,
45 clang::DiagnosticConsumer* DiagConsumer)
override;
Action to compute a single AST of file filename.
const clang::tooling::CompilationDatabase & db
std::filesystem::path file
ASTBuilderAction(std::unique_ptr< clang::ASTUnit > &AST, const clang::tooling::CompilationDatabase &db, const std::filesystem::path &filename, const std::filesystem::path &tmpdir)
std::filesystem::path tmpdir
std::unique_ptr< clang::ASTUnit > & AST
bool runInvocation(std::shared_ptr< clang::CompilerInvocation > Invocation, clang::FileManager *Files, std::shared_ptr< clang::PCHContainerOperations > PCHContainerOps, clang::DiagnosticConsumer *DiagConsumer) override