summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/ClangdServer.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2019-01-14 18:11:09 +0000
committerHaojian Wu <hokein@google.com>2019-01-14 18:11:09 +0000
commitc34f022bfed27bb608d784f1062709bbed5b710d (patch)
treed57602ac48b8662ef65cb16d761b90103bdcfccd /clang-tools-extra/clangd/ClangdServer.cpp
parentda97713fc40436e1ddfd4d0a73e5446e40148258 (diff)
downloadbcm5719-llvm-c34f022bfed27bb608d784f1062709bbed5b710d.tar.gz
bcm5719-llvm-c34f022bfed27bb608d784f1062709bbed5b710d.zip
[clangd] Add Limit parameter for xref.
Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56597 llvm-svn: 351081
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
-rw-r--r--clang-tools-extra/clangd/ClangdServer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index f799d6bc670..53a27bdb91d 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -500,13 +500,13 @@ void ClangdServer::documentSymbols(llvm::StringRef File,
Bind(Action, std::move(CB)));
}
-void ClangdServer::findReferences(PathRef File, Position Pos,
+void ClangdServer::findReferences(PathRef File, Position Pos, uint32_t Limit,
Callback<std::vector<Location>> CB) {
- auto Action = [Pos, this](Callback<std::vector<Location>> CB,
- llvm::Expected<InputsAndAST> InpAST) {
+ auto Action = [Pos, Limit, this](Callback<std::vector<Location>> CB,
+ llvm::Expected<InputsAndAST> InpAST) {
if (!InpAST)
return CB(InpAST.takeError());
- CB(clangd::findReferences(InpAST->AST, Pos, Index));
+ CB(clangd::findReferences(InpAST->AST, Pos, Limit, Index));
};
WorkScheduler.runWithAST("References", File, Bind(Action, std::move(CB)));
OpenPOWER on IntegriCloud