[all-commits] [llvm/llvm-project] 765b12: [clangd] Untangle Hover from XRefs, move into own ...
Sam McCall via All-commits
all-commits at lists.llvm.org
Tue Nov 19 06:12:45 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 765b1250f6845e765abf01908b122dab441c2a42
https://github.com/llvm/llvm-project/commit/765b1250f6845e765abf01908b122dab441c2a42
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2019-11-19 (Tue, 19 Nov 2019)
Changed paths:
M clang-tools-extra/clangd/AST.cpp
M clang-tools-extra/clangd/AST.h
M clang-tools-extra/clangd/CMakeLists.txt
M clang-tools-extra/clangd/ClangdServer.h
A clang-tools-extra/clangd/Hover.cpp
A clang-tools-extra/clangd/Hover.h
M clang-tools-extra/clangd/XRefs.cpp
M clang-tools-extra/clangd/XRefs.h
M clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
M clang-tools-extra/clangd/unittests/ASTTests.cpp
M clang-tools-extra/clangd/unittests/CMakeLists.txt
A clang-tools-extra/clangd/unittests/HoverTests.cpp
M clang-tools-extra/clangd/unittests/XRefsTests.cpp
Log Message:
-----------
[clangd] Untangle Hover from XRefs, move into own file.
Summary:
This is mostly mechanical, with a few exceptions:
- getDeducedType moved into AST.h where it belongs. It now takes
ASTContext instead of ParsedAST, and avoids using the preprocessor.
- hover now uses SelectionTree directly rather than via
getDeclAtPosition helper
- hover on 'auto' used to find the decl that contained the 'auto' and
use that to set Kind and documentation for the hover result.
Now we use targetDecl() to find the decl matching the deduced type instead.
This changes tests, e.g. 'variable' -> class for auto on lambdas.
I think this is better, but the motivation was to avoid depending on
the internals of DeducedTypeVisitor. This functionality is removed
from the visitor.
Reviewers: kadircet
Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D70357
More information about the All-commits
mailing list