[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:39 PDT 2019


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:574
 
-  // We want to include the template in the Hover.
-  if (TemplateDecl *TD = D->getDescribedTemplate())
-    D = TD;
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+                              const std::vector<HoverInfo::Param> &Params) {
----------------
sammccall wrote:
> I don't think it's reasonable to define this private helper as an overload of operator<<.
> Make it a function, or inline it? (I think used only once)
it is also used within render, making it a function


================
Comment at: clang-tools-extra/clangd/XRefs.h:65
+  /// Fully qualiffied name for the scope containing the Sym.
+  std::string Scope;
+  std::string ParentScope;
----------------
sammccall wrote:
> what's the difference between Scope and ParentScope?
> Can we give them more obvious names, or a comment?
> (The current comment doesn't really say anything)
We've been using Name and Scope to represent two parts of qualified names across the codebase.
Comment was unfortunately misplaced :/ LMK if you have any other choices for the name


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