diff options
author | Haojian Wu <hokein@google.com> | 2018-09-05 12:00:15 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2018-09-05 12:00:15 +0000 |
commit | 53e91c1b086267f9c77e9dcb3f7f54b0b17ae1b0 (patch) | |
tree | 88d6f363d74586a4f007878db6b1873d1db16e3b /lldb/scripts/Python/python-extensions.swig | |
parent | 1ad142fe260566f9d14e65cb2a48a2123e2edee0 (diff) | |
download | llvm-53e91c1b086267f9c77e9dcb3f7f54b0b17ae1b0.zip llvm-53e91c1b086267f9c77e9dcb3f7f54b0b17ae1b0.tar.gz llvm-53e91c1b086267f9c77e9dcb3f7f54b0b17ae1b0.tar.bz2 |
[clangd] Sort GoToDefinition results.
Summary:
GoToDefinition returns all declaration results (implicit/explicit) that are
in the same location, and the results are returned in arbitrary order.
Some LSP clients defaultly take the first result as the final result, which
might present a bad result (implicit decl) to users.
This patch ranks the result based on whether the declarations are
referenced explicitly/implicitly. We put explicit declarations first.
This also improves the "hover" (which just take the first result) feature
in some cases.
Reviewers: ilya-biryukov
Subscribers: kadircet, ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D50438
llvm-svn: 341463
Diffstat (limited to 'lldb/scripts/Python/python-extensions.swig')
0 files changed, 0 insertions, 0 deletions