[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 02:13:37 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:
> > 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"?


================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:365
        [](HoverInfo &HI) {
-         HI.Name = "class (lambda)";
+         // FIXME: Special case lambdas.
+         HI.Name = "(anonymous class)";
----------------
kadircet wrote:
> ilya-biryukov wrote:
> > NIT: could you give an example how you want the output to look like?
> See D71544
D71544 is trivial, could you put it into this patch?
Having a FIXME that is fixed in the follow-up with a one-line change seems to potentially complicate things (reverts, reading change history).


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