llvm-project/clang-tools-extra/clangd/refactor
Sam McCall 765b1250f6 [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
2019-11-19 15:11:37 +01:00
..
tweaks [clangd] Untangle Hover from XRefs, move into own file. 2019-11-19 15:11:37 +01:00
Rename.cpp Reland "[clangd] Implement rename by using SelectionTree and findExplicitReferences." 2019-11-19 10:20:25 +01:00
Rename.h [clangd] Move getBeginningOfIdentifier from ClangdUnit to SourceCode. Drop dependencies on ClangdUnit from some headers. NFC 2019-09-03 15:34:47 +00:00
Tweak.cpp [clangd] Reland Store Index in Tweak::Selection 2019-10-28 07:55:58 +01:00
Tweak.h [clangd] Reland Store Index in Tweak::Selection 2019-10-28 07:55:58 +01:00