[clang-tools-extra] dced150 - [clangd] Use WorkScheduler.run() in ClangdServer::resolveTypeHierarchy()
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 23 17:44:37 PST 2020
Author: Nathan Ridge
Date: 2020-11-23T20:44:14-05:00
New Revision: dced150375d09df6266448342fbb066d638b59ef
URL: https://github.com/llvm/llvm-project/commit/dced150375d09df6266448342fbb066d638b59ef
DIFF: https://github.com/llvm/llvm-project/commit/dced150375d09df6266448342fbb066d638b59ef.diff
LOG: [clangd] Use WorkScheduler.run() in ClangdServer::resolveTypeHierarchy()
Differential Revision: https://reviews.llvm.org/D91941
Added:
Modified:
clang-tools-extra/clangd/ClangdServer.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index 523931d9cc7b..502078c776db 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -674,8 +674,11 @@ void ClangdServer::typeHierarchy(PathRef File, Position Pos, int Resolve,
void ClangdServer::resolveTypeHierarchy(
TypeHierarchyItem Item, int Resolve, TypeHierarchyDirection Direction,
Callback<llvm::Optional<TypeHierarchyItem>> CB) {
- clangd::resolveTypeHierarchy(Item, Resolve, Direction, Index);
- CB(Item);
+ WorkScheduler.run(
+ "Resolve Type Hierarchy", "", [=, CB = std::move(CB)]() mutable {
+ clangd::resolveTypeHierarchy(Item, Resolve, Direction, Index);
+ CB(Item);
+ });
}
void ClangdServer::prepareCallHierarchy(
More information about the cfe-commits
mailing list