Home
last modified time | relevance | path

Searched refs:FileDistance (Results 1 – 7 of 7) sorted by relevance

/external/llvm-project/clang-tools-extra/clangd/unittests/
DFileDistanceTests.cpp24 FileDistance D( in TEST()
54 FileDistance D({{"a", SourceParams()}, {"b/b/b", CostLots}}, Opts); in TEST()
83 TEST(FileDistance, LimitUpTraversals) { in TEST() argument
90 FileDistance D({{"/", CostLots}, {"/a/b/c", CheapButLimited}}, Opts); in TEST()
97 TEST(FileDistance, DisallowDownTraversalsFromRoot) { in TEST() argument
104 FileDistance D({{"/", SourceParams()}, {"/a/b/c", CostLots}}, Opts); in TEST()
108 EXPECT_EQ(D.distance("/x"), FileDistance::Unreachable); in TEST()
/external/llvm-project/clang-tools-extra/clangd/
DFileDistance.h72 class FileDistance {
77 FileDistance(llvm::StringMap<SourceParams> Sources,
106 FileDistance &forScheme(llvm::StringRef Scheme);
111 llvm::StringMap<std::unique_ptr<FileDistance>> ByScheme;
125 FileDistance Distance;
DFileDistance.cpp54 constexpr const unsigned FileDistance::Unreachable;
55 const llvm::hash_code FileDistance::RootHash =
58 FileDistance::FileDistance(llvm::StringMap<SourceParams> Sources, in FileDistance() function in clang::clangd::FileDistance
118 unsigned FileDistance::distance(llvm::StringRef Path) { in distance()
150 auto R = Cache.try_emplace(llvm::hash_value(URI), FileDistance::Unreachable); in distance()
162 FileDistance &URIDistance::forScheme(llvm::StringRef Scheme) { in forScheme()
174 Delegate.reset(new FileDistance(std::move(SchemeSources), Opts)); in forScheme()
185 static FileDistance
211 return FileDistance(std::move(Sources), Opts); in createScopeFileDistance()
DQuality.cpp325 static float fileProximityScore(unsigned FileDistance) { in fileProximityScore() argument
329 if (FileDistance == FileDistance::Unreachable) in fileProximityScore()
332 return std::exp(FileDistance * -0.4f / FileDistanceOptions().UpCost); in fileProximityScore()
339 if (ScopeDistance == FileDistance::Unreachable) in scopeProximityScore()
358 ? FileDistance::Unreachable in calculateDerivedSignals()
DQuality.h149 unsigned FileProximityDistance = FileDistance::Unreachable;
151 unsigned ScopeProximityDistance = FileDistance::Unreachable;
DCMakeLists.txt63 FileDistance.cpp
/external/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/
DBUILD.gn84 "FileDistance.cpp",