[PATCH] D82714: [clangd] Remove redundant `findRefs` calls. NFC.

liu hui via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 28 06:01:15 PDT 2020


lh123 created this revision.
lh123 added reviewers: sammccall, kadircet.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
lh123 updated this revision to Diff 273928.
lh123 added a comment.

Rebase to head.


Remove redundant `findRefs` calls.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82714

Files:
  clang-tools-extra/clangd/XRefs.cpp


Index: clang-tools-extra/clangd/XRefs.cpp
===================================================================
--- clang-tools-extra/clangd/XRefs.cpp
+++ clang-tools-extra/clangd/XRefs.cpp
@@ -993,7 +993,6 @@
           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 different kinds, deduplicate them.
         for (const auto &Ref : findRefs({Decls.begin(), Decls.end()}, AST))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82714.273928.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200628/1dd35d20/attachment-0001.bin>


More information about the cfe-commits mailing list