clang-tools  14.0.0git
Classes | Namespaces | Functions
Trigram.h File Reference
#include "Token.h"
#include "llvm/ADT/bit.h"
#include <string>
Include dependency graph for Trigram.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clang::clangd::dex::Trigram
 
struct  llvm::DenseMapInfo< clang::clangd::dex::Trigram >
 

Namespaces

 clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
 clang::clangd
 
 clang::clangd::dex
 
 llvm
 Some operations such as code completion produce a set of candidates.
 

Functions

void clang::clangd::dex::generateIdentifierTrigrams (llvm::StringRef Identifier, std::vector< Trigram > &Out)
 Produces list of unique fuzzy-search trigrams from unqualified symbol. More...
 
std::vector< Token > clang::clangd::dex::generateQueryTrigrams (llvm::StringRef Query)
 Returns list of unique fuzzy-search trigrams given a query. More...
 

Detailed Description

Trigrams are attributes of the symbol unqualified name used to effectively extract symbols which can be fuzzy-matched given user query from the inverted index. To match query with the extracted set of trigrams Q, the set of generated trigrams T for identifier (unqualified symbol name) should contain all items of Q, i.e. Q ⊆ T.

Trigram sets extracted from unqualified name and from query are different: the set of query trigrams only contains consecutive sequences of three characters (which is only a subset of all trigrams generated for an identifier).

Definition in file Trigram.h.