clang-tools 10.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< FuzzyFindRequest > | CachedReq
| A cached request from past code completions. More...
llvm::Optional< FuzzyFindRequest > | NewReq
| The actual request used by `codeComplete()`. More...
std::future< SymbolSlab > | Result
| 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 228 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 231 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 234 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 237 of file CodeComplete.h.

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

- CodeComplete.h