clang-tools  8.0.0
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:
[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 205 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 208 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 211 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 214 of file CodeComplete.h.


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