kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/Hover.cpp:1065
 
+  if (Parameters && !Parameters->empty()) {
+    Output.addParagraph().appendText("Parameters: ");
----------------
it's a subtle invariant that we only have parameters for functions (which has a 
return type) or constructor/destructor/conversion-operators (which doesn't have 
either a type or a return type).

I think we should assert on `Type` not being present here, as otherwise we 
would probably duplicate parameters in both places. can you also add a 
condition around `!Type` and have a comment saying ` // Don't print parameters 
after Type, as they're likely to be mentioned there.`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114621

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

Reply via email to