[clangd] Get rid of Inclusion::R
authorKadir Cetinkaya <kadircet@google.com>
Mon, 4 May 2020 08:48:19 +0000 (10:48 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Tue, 5 May 2020 10:23:58 +0000 (12:23 +0200)
commitd870016bfce8135c8b004c671697d091345463f0
tree1ef6bcefda45c0ea5cc45f14fc7d00d9fe40708b
parent5beb9fa4abceae69c26da3616c68c19345f840fe
[clangd] Get rid of Inclusion::R

Summary:
This is only used by documentlink and go-to-definition. We are pushing
range detection logic from Inclusion creation to users. This would make using
stale preambles easier.

For document links we make use of the spelledtokens stored in tokenbuffers to
figure out file name range.

For go-to-def, we keep storing the line number we've seen the include directive.

Reviewers: sammccall

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79315
clang-tools-extra/clangd/Headers.cpp
clang-tools-extra/clangd/Headers.h
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/HeadersTests.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp