clang-tools 24.0.0git
clang::clangd::ClangTidyFeatureModule Class Referencefinal

Runs clang-tidy checks as part of clangd's AST build. More...

#include <ClangTidyFeatureModule.h>

Inheritance diagram for clang::clangd::ClangTidyFeatureModule:
[legend]

Public Member Functions

 ClangTidyFeatureModule (TidyProvider OptionsProvider)
 Construct explicitly with the application's clang-tidy options provider.
void swapProvider (std::shared_ptr< const TidyProvider > &OptionsProvider)
 Swap provider snapshots, e.g.
std::unique_ptr< ASTListener > astListeners () override
 Can be called asynchronously before building an AST.
Public Member Functions inherited from clang::clangd::FeatureModule
virtual ~FeatureModule ()
virtual void initializeLSP (LSPBinder &Bind, const llvm::json::Object &ClientCaps, llvm::json::Object &ServerCaps)
 Called by the server to connect this feature module to LSP.
void initialize (const Facilities &F)
 Called by the server to prepare this module for use.
virtual void stop ()
 Requests that the module cancel background work and go idle soon.
virtual bool blockUntilIdle (Deadline)
 Waits until the module is idle (no background work) or a deadline expires.
virtual void contributeTweaks (std::vector< std::unique_ptr< Tweak > > &Out)
 Tweaks implemented by this module.

Additional Inherited Members

Protected Types inherited from clang::clangd::FeatureModule
template<typename P>
using OutgoingNotification = llvm::unique_function<void(const P &)>
 Types of function objects that feature modules use for outgoing calls.
template<typename P, typename R>
using OutgoingMethod = llvm::unique_function<void(const P &, Callback<R>)>
Protected Member Functions inherited from clang::clangd::FeatureModule
Facilities & facilities ()
 Accessors for modules to access shared server facilities they depend on.
TUScheduler & scheduler ()
 The scheduler is used to run tasks on worker threads and access ASTs.
const SymbolIndex * index ()
 The index is used to get information about the whole codebase.
const ThreadsafeFS & fs ()
 The filesystem is used to read source files on disk.

Detailed Description

Runs clang-tidy checks as part of clangd's AST build.

Definition at line 22 of file ClangTidyFeatureModule.h.

Constructor & Destructor Documentation

◆ ClangTidyFeatureModule()

clang::clangd::ClangTidyFeatureModule::ClangTidyFeatureModule ( TidyProvider OptionsProvider)
inlineexplicit

Construct explicitly with the application's clang-tidy options provider.

Takes ownership of the provider; an empty provider disables checks.

Definition at line 26 of file ClangTidyFeatureModule.h.

Member Function Documentation

◆ astListeners()

std::unique_ptr< FeatureModule::ASTListener > clang::clangd::ClangTidyFeatureModule::astListeners ( )
overridevirtual

Can be called asynchronously before building an AST.

Reimplemented from clang::clangd::FeatureModule.

Definition at line 390 of file ClangTidyFeatureModule.cpp.

◆ swapProvider()

void clang::clangd::ClangTidyFeatureModule::swapProvider ( std::shared_ptr< const TidyProvider > & OptionsProvider)

Swap provider snapshots, e.g.

to temporarily override the configuration for benchmarking and restore it afterwards. Existing listeners retain their snapshot.

Definition at line 405 of file ClangTidyFeatureModule.cpp.


The documentation for this class was generated from the following files: