sammccall marked an inline comment as done.
sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:598
+    // Constructor's "return type" is the class type.
+    HI.ReturnType = declaredType(CCD->getParent()).getAsString(Policy);
+    // Don't provide any type for the constructor itself.
----------------
hokein wrote:
> this looks reasonable though I'd prefer not setting the return type for 
> ctor/dtor. If we decide to go down this path, we'd better make other 
> "returnType" places (`Symbol::ReturnType`, CodeCompletion) align with this.
So code completion shows ~foo() as type void, and has no return type for 
constructors (including when it would matter for ranking!). Indexing code 
doesn't have a return type for either.
Per offline discussion, I'd rather fix those to include the type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70317



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to