clang-tools 19.0.0git
Public Attributes | List of all members
clang::clangd::SpeculativeFuzzyFind Struct Reference

A speculative and asynchronous fuzzy find index request (based on cached request) that can be sent before parsing sema. More...

#include <CodeComplete.h>

Public Attributes

std::optional< FuzzyFindRequestCachedReq
 A cached request from past code completions.
 
std::optional< FuzzyFindRequestNewReq
 The actual request used by codeComplete().
 
std::future< std::pair< bool, SymbolSlab > > Result
 The result is consumed by codeComplete() if speculation succeeded.
 

Detailed Description

A speculative and asynchronous fuzzy find index request (based on cached request) that can be sent before parsing sema.

This would reduce completion latency if the speculation succeeds.

Definition at line 263 of file CodeComplete.h.

Member Data Documentation

◆ CachedReq

std::optional<FuzzyFindRequest> clang::clangd::SpeculativeFuzzyFind::CachedReq

A cached request from past code completions.

Set by caller of codeComplete().

Definition at line 266 of file CodeComplete.h.

◆ NewReq

std::optional<FuzzyFindRequest> clang::clangd::SpeculativeFuzzyFind::NewReq

The actual request used by codeComplete().

Set by codeComplete(). This can be used by callers to update cache.

Definition at line 269 of file CodeComplete.h.

◆ Result

std::future<std::pair<bool , SymbolSlab> > clang::clangd::SpeculativeFuzzyFind::Result

The result is consumed by codeComplete() if speculation succeeded.

NOTE: the destructor will wait for the async call to finish.

Definition at line 272 of file CodeComplete.h.


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