[PATCH] D124690: [clangd] add inlay hints for std::forward-ed parameter packs

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 28 15:59:40 PDT 2022


nridge added inline comments.


================
Comment at: clang-tools-extra/clangd/InlayHints.cpp:483
+           !Type.getNonReferenceType().isConstQualified() &&
+           !isExpandedParameterPack(Param);
   }
----------------
sammccall wrote:
> why is this check needed if we already decline to provide a name for the parameter on line 534 in chooseParameterNames?
`shouldHintName` and `shouldHintReference` are [two independent conditions](https://searchfox.org/llvm/rev/508eb41d82ca956c30950d9a16b522a29aeeb333/clang-tools-extra/clangd/InlayHints.cpp#411-418) governing whether we show the parameter name and/or a `&` indicating pass-by-mutable-ref, respectively

(I did approve the [patch](https://reviews.llvm.org/D124359) that introduced `shouldHintReference` myself, hope that's ok)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124690



More information about the cfe-commits mailing list