[PATCH] D75166: [clangd] Clean-up locateSymbolAt

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 26 05:22:13 PST 2020


kadircet updated this revision to Diff 246682.
kadircet added a comment.

Add more cleaning.

getDeclAtPosition builds a SelectionTree underneath and it only operates on
spelling locations inside main file. So it is invalid to pass any expansion
locations to it.

There is no need to call getBeginningOfIdentifier for offsets being thrown at
SelectionTrees.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75166/new/

https://reviews.llvm.org/D75166

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75166.246682.patch
Type: text/x-patch
Size: 7620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200226/1949da9a/attachment-0001.bin>


More information about the cfe-commits mailing list