[clangd] Cleanup the duplicated getTokenRange.
authorHaojian Wu <hokein@google.com>
Tue, 25 Jun 2019 08:01:46 +0000 (08:01 +0000)
committerHaojian Wu <hokein@google.com>
Tue, 25 Jun 2019 08:01:46 +0000 (08:01 +0000)
commit92c32574771465606807dea77c928c4d7768bbe9
tree15d3417ce93b218d9382d50677b4cd797f79b2c3
parent303c9861e90cb9a15b15d31fab06d0374d42c9af
[clangd] Cleanup the duplicated getTokenRange.

Summary:
Also lift it to SourceCode.h, so that it can be used in other places
(semantic code highlighting).

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63714

llvm-svn: 364280
clang-tools-extra/clangd/SourceCode.cpp
clang-tools-extra/clangd/SourceCode.h
clang-tools-extra/clangd/XRefs.cpp