clang-tools 22.0.0git
clang::clangd::ScopeDistance Class Reference

Support lookups like FileDistance, but the lookup keys are symbol scopes. More...

#include <FileDistance.h>

Public Member Functions

 ScopeDistance (llvm::ArrayRef< std::string > QueryScopes)
 QueryScopes[0] is the preferred scope.
unsigned distance (llvm::StringRef SymbolScope)

Detailed Description

Support lookups like FileDistance, but the lookup keys are symbol scopes.

For example, a scope "na::nb::" is converted to "/na/nb".

Definition at line 112 of file FileDistance.h.

Constructor & Destructor Documentation

◆ ScopeDistance()

clang::clangd::ScopeDistance::ScopeDistance ( llvm::ArrayRef< std::string > QueryScopes)

QueryScopes[0] is the preferred scope.

Definition at line 216 of file FileDistance.cpp.

References clang::clangd::createScopeFileDistance(), and ScopeDistance().

Referenced by ScopeDistance().

Member Function Documentation

◆ distance()

unsigned clang::clangd::ScopeDistance::distance ( llvm::StringRef SymbolScope)

Definition at line 219 of file FileDistance.cpp.

References clang::clangd::scopeToPath().


The documentation for this class was generated from the following files: