clang-tools  14.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>

Collaboration diagram for clang::clangd::SpeculativeFuzzyFind:
Collaboration graph
[legend]

Public Attributes

llvm::Optional< FuzzyFindRequestCachedReq
 A cached request from past code completions. More...
 
llvm::Optional< FuzzyFindRequestNewReq
 The actual request used by codeComplete(). More...
 
std::future< SymbolSlabResult
 The result is consumed by codeComplete() if speculation succeeded. More...
 

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 256 of file CodeComplete.h.

Member Data Documentation

◆ CachedReq

llvm::Optional<FuzzyFindRequest> clang::clangd::SpeculativeFuzzyFind::CachedReq

A cached request from past code completions.

Set by caller of codeComplete().

Definition at line 259 of file CodeComplete.h.

◆ NewReq

llvm::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 262 of file CodeComplete.h.

◆ Result

std::future<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 265 of file CodeComplete.h.


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