[PATCH] D70357: [clangd] Untangle Hover from XRefs, move into own file.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 16 08:11:09 PST 2019
sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny.
Herald added a project: clang.
sammccall updated this revision to Diff 229696.
sammccall added a comment.
Herald added a subscriber: ormris.
Include omitted files
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70357
Files:
clang-tools-extra/clangd/AST.cpp
clang-tools-extra/clangd/AST.h
clang-tools-extra/clangd/CMakeLists.txt
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/Hover.cpp
clang-tools-extra/clangd/Hover.h
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/XRefs.h
clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp
clang-tools-extra/clangd/unittests/ASTTests.cpp
clang-tools-extra/clangd/unittests/CMakeLists.txt
clang-tools-extra/clangd/unittests/HoverTests.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70357.229696.patch
Type: text/x-patch
Size: 124176 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191116/b8573c36/attachment-0001.bin>
More information about the cfe-commits
mailing list