[PATCH] D120258: [clangd] Add inlay hints for auto-typed parameters with one instantiation.

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 22 00:28:23 PST 2022


nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:323
+           "Instantiated function has fewer (non-pack) parameters?");
+    return InstantiatedFunction->getParamDecl(ParamIdx);
+  }
----------------
Here's a test case which slips past these checks:

```
int waldo(auto... args, auto last);
int x = waldo<int, float>(1, 2.0, 'x');
```

`last` incorrectly gets `float` (rather than `char`) as a hint


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120258



More information about the cfe-commits mailing list