[PATCH] D71543: [clangd] Fix handling of inline/anon namespaces and names of deduced types in hover
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 17 03:38:32 PST 2019
ilya-biryukov 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) {
----------------
kadircet wrote:
> 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.
if `T->getAsTagDecl()` is non-null, why does `D` being passed to the function is null?
How can they be different?
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