#include "clang/Tooling/Execution.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/FrontendAction.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Tooling/AllTUsExecution.h"
#include "clang/Tooling/CompilationDatabase.h"
#include "clang/Tooling/StandaloneExecution.h"
#include "clang/Tooling/ToolExecutorPluginRegistry.h"
#include "clang/Tooling/Tooling.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <algorithm>
#include <string>
namespace clang {
namespace tooling {
namespace {
class ASTConsumerWithResult
: public ASTConsumer,
public RecursiveASTVisitor<ASTConsumerWithResult> { … };
class ReportResultAction : public ASTFrontendAction { … };
class ReportResultActionFactory : public FrontendActionFactory { … };
}
class TestToolExecutor : public ToolExecutor { … };
const char *TestToolExecutor::ExecutorName = …;
class TestToolExecutorPlugin : public ToolExecutorPlugin { … };
static ToolExecutorPluginRegistry::Add<TestToolExecutorPlugin>
X("test-executor", "Plugin for TestToolExecutor.");
llvm::cl::OptionCategory TestCategory("execution-test options");
TEST(CreateToolExecutorTest, FailedCreateExecutorUndefinedFlag) { … }
TEST(CreateToolExecutorTest, RegisterFlagsBeforeReset) { … }
TEST(CreateToolExecutorTest, CreateStandaloneToolExecutor) { … }
TEST(CreateToolExecutorTest, CreateTestToolExecutor) { … }
TEST(StandaloneToolTest, SynctaxOnlyActionOnSimpleCode) { … }
TEST(StandaloneToolTest, SimpleAction) { … }
TEST(StandaloneToolTest, SimpleActionWithResult) { … }
class FixedCompilationDatabaseWithFiles : public CompilationDatabase { … };
MATCHER_P(Named, Name, "") { … }
TEST(AllTUsToolTest, AFewFiles) { … }
TEST(AllTUsToolTest, ManyFiles) { … }
}
}