[PATCH] D147395: [Clangd] Make the type hint length limit configurable
Yi Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 3 08:38:21 PDT 2023
zhangyi1357 marked 2 inline comments as done.
zhangyi1357 added a comment.
In D147395#4240227 <https://reviews.llvm.org/D147395#4240227>, @hokein wrote:
> Thanks for the contribution!
It's really interesting for me. Thanks for your time reviewing!
================
Comment at: clang-tools-extra/clangd/Config.h:151
+ // Limit the length of type names in inlay hints.
+ size_t TypeNameLimit = 32;
} InlayHints;
----------------
hokein wrote:
> I would extend it a bit more -- 0 means no limit.
>
> Can you also add a unittest in `TEST(TypeHints, LongTypeName)` in `InlayHintTests.cpp`?
> 0 means no limit.
This is quite a good idea. I've done it.
For unittest, there is already `TEST(TypeHints, LongTypeName)` in `InlayHintTests.cpp`. Do you mean add more tests in the same `TEST` or another `TEST` with TypeNameLimit configured?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147395/new/
https://reviews.llvm.org/D147395
More information about the cfe-commits
mailing list