[clang-tools-extra] 84ced55 - [clangd] Remove redundant `findRefs` calls. NFC.
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 03:11:26 PDT 2020
Author: lh123
Date: 2020-06-30T18:10:52+08:00
New Revision: 84ced55d9b7bade7c9db39f3bcebc6af333dc325
URL: https://github.com/llvm/llvm-project/commit/84ced55d9b7bade7c9db39f3bcebc6af333dc325
DIFF: https://github.com/llvm/llvm-project/commit/84ced55d9b7bade7c9db39f3bcebc6af333dc325.diff
LOG: [clangd] Remove redundant `findRefs` calls. NFC.
Summary:
Remove redundant `findRefs` calls.
Reviewers: sammccall, kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D82714
Added:
Modified:
clang-tools-extra/clangd/XRefs.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp
index a7bbfd4f967c..9b44edce95da 100644
--- a/clang-tools-extra/clangd/XRefs.cpp
+++ b/clang-tools-extra/clangd/XRefs.cpp
@@ -993,7 +993,6 @@ std::vector<DocumentHighlight> findDocumentHighlights(ParsedAST &AST,
DeclRelation::TemplatePattern | DeclRelation::Alias;
auto Decls = targetDecl(N->ASTNode, Relations);
if (!Decls.empty()) {
- auto Refs = findRefs({Decls.begin(), Decls.end()}, AST);
// FIXME: we may get multiple DocumentHighlights with the same location
// and
diff erent kinds, deduplicate them.
for (const auto &Ref : findRefs({Decls.begin(), Decls.end()}, AST))
More information about the cfe-commits
mailing list