OSDN Git Service

[clangd] Highlight related control flow.
authorSam McCall <sam.mccall@gmail.com>
Sun, 19 Apr 2020 00:19:25 +0000 (02:19 +0200)
committerSam McCall <sam.mccall@gmail.com>
Thu, 28 May 2020 11:25:11 +0000 (13:25 +0200)
commita56141b8f9fea112c1ea078c974d91949b6e7a5c
treef2c815d4f724ffce49cd9c200e837c1505501c64
parentbab5dadfcd0fc3a77c47aec7e885e8b70b9f9756
[clangd] Highlight related control flow.

Summary:
This means e.g. highlighting "return" will show other returns/throws
from the same function, highlighting a case will show all the
return/breaks etc.

This is a bit of an abuse of textDocument/highlight, but seems useful.

Reviewers: adamcz

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78454
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp