Home
last modified time | relevance | path

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

/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A 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()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DFileDistance.cpp56 constexpr const unsigned FileDistance::Unreachable;
57 const llvm::hash_code FileDistance::RootHash =
60 FileDistance::FileDistance(llvm::StringMap<SourceParams> Sources, in FileDistance() function in clang::clangd::FileDistance
119 unsigned FileDistance::distance(llvm::StringRef Path) { in distance()
151 auto R = Cache.try_emplace(llvm::hash_value(URI), FileDistance::Unreachable); in distance()
163 FileDistance &URIDistance::forScheme(llvm::StringRef Scheme) { in forScheme()
175 Delegate.reset(new FileDistance(std::move(SchemeSources), Opts)); in forScheme()
186 static FileDistance
212 return FileDistance(std::move(Sources), Opts); in createScopeFileDistance()
H A DFileDistance.h67 class FileDistance {
72 FileDistance(llvm::StringMap<SourceParams> Sources,
101 FileDistance &forScheme(llvm::StringRef Scheme);
106 llvm::StringMap<std::unique_ptr<FileDistance>> ByScheme;
120 FileDistance Distance;
H A DQuality.cpp350 static float fileProximityScore(unsigned FileDistance) { in fileProximityScore() argument
354 if (FileDistance == FileDistance::Unreachable) in fileProximityScore()
357 return std::exp(FileDistance * -0.4f / FileDistanceOptions().UpCost); in fileProximityScore()
364 if (ScopeDistance == FileDistance::Unreachable) in scopeProximityScore()
383 ? FileDistance::Unreachable in calculateDerivedSignals()
H A DQuality.h155 unsigned FileProximityDistance = FileDistance::Unreachable;
157 unsigned ScopeProximityDistance = FileDistance::Unreachable;
H A DCMakeLists.txt77 FileDistance.cpp
/llvm-project-15.0.7/llvm/utils/gn/secondary/clang-tools-extra/clangd/
H A DBUILD.gn95 "FileDistance.cpp",
/llvm-project-15.0.7/clang/docs/tools/
H A Dclang-formatted-files.txt1388 clang-tools-extra/clangd/FileDistance.cpp
1389 clang-tools-extra/clangd/FileDistance.h