[PATCH] D130259: [clangd] fix crash and handle implicit conversions in inlay hints for forwarding functions

Tobias Ribizel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 21 05:42:43 PDT 2022


upsj created this revision.
upsj added reviewers: nridge, sammccall, kadircet.
upsj added a project: clang-tools-extra.
Herald added subscribers: usaxena95, arphaman.
Herald added a project: All.
upsj requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.

The `ForwardingCallVisitor` previously picked up on (constructor or function) calls inside a single argument of a variadic function, where the corresponding pack expression is (partially) expanded, but only consists of a single entry. This mismatch between expecting the full pack and finding only a single entry caused a crash, which the first half of this diff fixes.

The second half deals with the failure of `resolveForwardingParameters` to detect forwarded parameters when implicit conversions happen via constructor calls, not normal `ImplicitCastExpr`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130259

Files:
  clang-tools-extra/clangd/AST.cpp
  clang-tools-extra/clangd/unittests/InlayHintTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130259.446449.patch
Type: text/x-patch
Size: 4573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220721/370810d1/attachment.bin>


More information about the cfe-commits mailing list