nridge added inline comments.

================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:208
+        // If the parameter is part of an expanded pack and not yet resolved
+        if (/*isExpandedParameter(Param) && */
+            ForwardedParams.find(Param) == ForwardedParams.end()) {
----------------
upsj wrote:
> This needs to be fixed, see `ParameterHints.VariadicPlain` vs. 
> `ParameterHints.VariadicForwarded` if uncommented - I'd need some input from 
> somebody with more knowledge about the AST
It looks like `isExpandedParameter()` relies on the `SubstTemplateTypeParmType` 
type sugar being present in the ParmVarDecl's type, but in some cases, the 
ParmVarDecl's type points to the canonical type directly.

I'm not sure what sort of guarantees the AST intends to make about the presence 
of type sugar. Based on past experience with Eclipse CDT, it's very easy to 
lose type sugar and maintaining it in all the right places takes some effort.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124690

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

Reply via email to