[llvm-branch-commits] [clang-tools-extra] dced150 - [clangd] Use WorkScheduler.run() in ClangdServer::resolveTypeHierarchy()
Nathan Ridge via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Nov 24 15:40:41 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 523931d9cc7bf..502078c776db9 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 llvm-branch-commits
mailing list