clang-tools  14.0.0git
Public Member Functions | List of all members
clang::clangd::ClangdServer::Callbacks Class Reference

Interface with hooks for users of ClangdServer to be notified of events. More...

#include <ClangdServer.h>

Inheritance diagram for clang::clangd::ClangdServer::Callbacks:
Inheritance graph
[legend]

Public Member Functions

virtual ~Callbacks ()=default
 
virtual void onDiagnosticsReady (PathRef File, llvm::StringRef Version, std::vector< Diag > Diagnostics)
 Called by ClangdServer when Diagnostics for File are ready. More...
 
virtual void onFileUpdated (PathRef File, const TUStatus &Status)
 Called whenever the file status is updated. More...
 
virtual void onBackgroundIndexProgress (const BackgroundQueue::Stats &Stats)
 Called when background indexing tasks are enqueued/started/completed. More...
 
virtual void onSemanticsMaybeChanged (PathRef File)
 Called when the meaning of a source code may have changed without an edit. More...
 

Detailed Description

Interface with hooks for users of ClangdServer to be notified of events.

Definition at line 65 of file ClangdServer.h.

Constructor & Destructor Documentation

◆ ~Callbacks()

virtual clang::clangd::ClangdServer::Callbacks::~Callbacks ( )
virtualdefault

Member Function Documentation

◆ onBackgroundIndexProgress()

virtual void clang::clangd::ClangdServer::Callbacks::onBackgroundIndexProgress ( const BackgroundQueue::Stats Stats)
inlinevirtual

Called when background indexing tasks are enqueued/started/completed.

Not called concurrently.

Definition at line 82 of file ClangdServer.h.

◆ onDiagnosticsReady()

virtual void clang::clangd::ClangdServer::Callbacks::onDiagnosticsReady ( PathRef  File,
llvm::StringRef  Version,
std::vector< Diag Diagnostics 
)
inlinevirtual

Called by ClangdServer when Diagnostics for File are ready.

These pushed diagnostics might correspond to an older version of the file, they do not interfere with "pull-based" ClangdServer::diagnostics. May be called concurrently for separate files, not for a single file.

Definition at line 73 of file ClangdServer.h.

◆ onFileUpdated()

virtual void clang::clangd::ClangdServer::Callbacks::onFileUpdated ( PathRef  File,
const TUStatus Status 
)
inlinevirtual

Called whenever the file status is updated.

May be called concurrently for separate files, not for a single file.

Definition at line 77 of file ClangdServer.h.

◆ onSemanticsMaybeChanged()

virtual void clang::clangd::ClangdServer::Callbacks::onSemanticsMaybeChanged ( PathRef  File)
inlinevirtual

Called when the meaning of a source code may have changed without an edit.

Usually clients assume that responses to requests are valid until they next edit the file. If they're invalidated at other times, we should tell the client. In particular, when an asynchronous preamble build finishes, we can provide more accurate semantic tokens, so we should tell the client to refresh.

Definition at line 90 of file ClangdServer.h.


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