[PATCH] D114665: [clangd] Make a.k.a printing configurable.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 7 04:19:56 PST 2021
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
(Sorry about all the boilerplate for adding config, I think I should probably add some tablegen magic to cover everything except Config.h)
================
Comment at: clang-tools-extra/clangd/ConfigFragment.h:271
+ /// Describes hover preferences.
+ struct HoverBlock {
+ /// Whether hover show a.k.a type.
----------------
One question is whether the setting should control hover specifically, or whether it covers "in places we print types" more generally. But it doesn't seem likely we'll make this configurable for diagnostics, and I don't have other examples. Most of our settings are per-feature. So I think this is right as it is.
================
Comment at: clang-tools-extra/clangd/ConfigFragment.h:273
+ /// Whether hover show a.k.a type.
+ llvm::Optional<Located<bool>> AKAPrint;
+ };
----------------
I'd call this ShowAKA
(verb before its object; "show" is a little less jargony)
================
Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:1
//===-- HoverTests.cpp ----------------------------------------------------===//
//
----------------
we should also add at least one test with it disabled
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114665/new/
https://reviews.llvm.org/D114665
More information about the cfe-commits
mailing list