Skip to content

Commit

Permalink
[clangd] Use WorkScheduler.run() in ClangdServer::resolveTypeHierarchy()
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D91941
  • Loading branch information
HighCommander4 committed Nov 24, 2020
1 parent 0a4f99c commit dced150
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions clang-tools-extra/clangd/ClangdServer.cpp
Expand Up @@ -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(
Expand Down

0 comments on commit dced150

Please sign in to comment.