[PATCH] D61497: [clangd] Introduce a structured hover response
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 05:28:55 PDT 2019
kadircet marked 6 inline comments as done.
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:539
-/// Generate a \p Hover object given the declaration \p D.
-static Hover getHoverContents(const Decl *D) {
- Hover H;
- llvm::Optional<std::string> NamedScope = getScopeName(D);
+static QualType getDeclType(const Decl *D) {
+ if (const TypedefNameDecl *TDD = dyn_cast<TypedefNameDecl>(D))
----------------
sammccall wrote:
> I think this is basically ASTContext::getTypeDeclType()?
No longer needed
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:549
- // Generate the "Declared in" section.
- if (NamedScope) {
- assert(!NamedScope->empty());
+static llvm::Optional<Location> getDeclLoc(const SourceLocation &SL,
+ ASTContext &AST) {
----------------
sammccall wrote:
> what does this have to do with decls?
No longer needed
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1214
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const HoverInfo &HI) {
+ OS << HI.Definition << '\n';
+ OS << HI.Documentation << '\n';
----------------
sammccall wrote:
> This doesn't seem sufficiently self-documenting.
No longer needed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61497/new/
https://reviews.llvm.org/D61497
More information about the cfe-commits
mailing list