15#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
16#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
22#include "clang/Frontend/CompilerInstance.h"
23#include "clang/Frontend/PrecompiledPreamble.h"
24#include "clang/Tooling/CompilationDatabase.h"
33 static void log(DiagnosticsEngine::Level DiagLevel,
34 const clang::Diagnostic &
Info);
37 const clang::Diagnostic &
Info)
override;
72std::unique_ptr<CompilerInvocation>
74 std::vector<std::string> *CC1Args =
nullptr);
87 std::unique_ptr<clang::CompilerInvocation>,
const PrecompiledPreamble *,
88 std::unique_ptr<llvm::MemoryBuffer>
MainFile,
std::unique_ptr< CompilerInvocation > CI
A FeatureModuleSet is a collection of feature modules installed in clangd.
void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info) override
static void log(DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info)
Interface for symbol indexes that can be used for searching or matching symbols among a set of symbol...
Wrapper for vfs::FileSystem for use in multithreaded programs like clangd.
llvm::function_ref< void(tidy::ClangTidyOptions &, llvm::StringRef)> TidyProviderRef
A factory to modify a tidy::ClangTidyOptions that doesn't hold any state.
@ Info
An information message.
std::unique_ptr< CompilerInvocation > buildCompilerInvocation(const ParseInputs &Inputs, clang::DiagnosticConsumer &D, std::vector< std::string > *CC1Args)
Builds compiler invocation that could be used to build AST or preamble.
std::unique_ptr< CompilerInstance > prepareCompilerInstance(std::unique_ptr< clang::CompilerInvocation > CI, const PrecompiledPreamble *Preamble, std::unique_ptr< llvm::MemoryBuffer > Buffer, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS, DiagnosticConsumer &DiagsClient)
void allowCrashPragmasForTest()
Respect #pragma clang __debug crash etc, which are usually disabled.
void disableUnsupportedOptions(CompilerInvocation &CI)
Clears CI from options that are not supported by clangd, like codegen or plugins.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
bool PreambleParseForwardingFunctions