clang-tools 8.0.0

Public Member Functions | List of all members
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. More...
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 117 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 215 of file FileDistance.cpp.

## Member Function Documentation

## ◆ distance()

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

Definition at line 218 of file FileDistance.cpp.

References clang::clangd::FileDistance::distance(), and clang::clangd::scopeToPath().

Referenced by clang::clangd::scopeBoost().

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

- FileDistance.h
- FileDistance.cpp