[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 02:41:45 PST 2019


kadircet marked 3 inline comments as done.
kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/Hover.cpp:353
 /// Generate a \p Hover object given the type \p T.
 HoverInfo getHoverContents(QualType T, const Decl *D, ASTContext &ASTCtx,
+                           const SymbolIndex *Index) {
----------------
ilya-biryukov wrote:
> kadircet wrote:
> > ilya-biryukov wrote:
> > > Not related to this patch, but what is `D` here? Is this getting hover contents for a type or for a decl?
> > it represents the deduced decl for Type, if any.
> What is a "deduced decl for Type"?
it was referring to the tagdecl referred by `decltype`s, i am not sure if there are cases in which this can be different than `T->getAsTagDecl`.
Always making use of `T->getAsTagDecl` doesn't seem to be causing any test failures.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71543/new/

https://reviews.llvm.org/D71543





More information about the cfe-commits mailing list