[PATCH] D75474: [clangd] Get rid of getTokenRange helper

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 11:36:38 PST 2020


kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny.
Herald added a project: clang.
kadircet added a parent revision: D75447: [clangd] Make use of token buffers in semantic highlighting.
kadircet added a parent revision: D75446: [clang][Syntax] Handle macro arguments in spelledForExpanded.

There's only one caller left in CollectMacros, which doesn't have
access to TokenBuffers. I believe we should just stop computing ranges in there,
and collect offsets instead. Later on we can convert them to Ranges when we've
got access to TokenBuffers. As those ranges are never used without a ParsedAST.
But leaving it out for now to keep the patch minimal.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75474

Files:
  clang-tools-extra/clangd/CMakeLists.txt
  clang-tools-extra/clangd/CollectMacros.cpp
  clang-tools-extra/clangd/CollectMacros.h
  clang-tools-extra/clangd/Hover.cpp
  clang-tools-extra/clangd/SourceCode.cpp
  clang-tools-extra/clangd/SourceCode.h
  clang-tools-extra/clangd/XRefs.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75474.247692.patch
Type: text/x-patch
Size: 15083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200302/c8fd3738/attachment-0001.bin>


More information about the cfe-commits mailing list