[PATCH] D71596: [clangd] Improve documentation for auto and implicit specs

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 07:57:40 PST 2019


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


================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:136
          HI.Kind = index::SymbolKind::Class;
-         HI.Definition = "template <typename T> class vector {}";
-         HI.TemplateParameters = {
-             {std::string("typename"), std::string("T"), llvm::None},
-         };
+         HI.Definition = "template <> class vector<int> {}";
        }},
----------------
ilya-biryukov wrote:
> Is this the intended behavior?
> I would've interepreted `Definition` as something that was written in the source code, but this one here is definitely synthesized by the compiler.
> 
> I'm happy to go either way, just wanted to make sure this is our conscious choice and understand why we're doing this.
I also wasn't sure about this one, but thought this would be more useful to users.

Because shows more semantic information about the symbol under the cursor, and we want to achieve that with Hover.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71596





More information about the cfe-commits mailing list