15#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
16#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
23#include "clang/Frontend/CompilerInstance.h"
24#include "clang/Frontend/PrecompiledPreamble.h"
25#include "clang/Tooling/CompilationDatabase.h"
34 static void log(DiagnosticsEngine::Level DiagLevel,
35 const clang::Diagnostic &
Info);
38 const clang::Diagnostic &
Info)
override;
75std::unique_ptr<CompilerInvocation>
77 std::vector<std::string> *CC1Args =
nullptr);
90 std::unique_ptr<clang::CompilerInvocation>,
const PrecompiledPreamble *,
91 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)
This class handles building module files for a given source file.
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