[PATCH] D125228: [clangd] Support for standard inlayHint protocol
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 10 07:49:23 PDT 2022
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Great! If you didn't already, can you check with VSCode before landing?
This might catch protocol bits we missed, but also will make sure that the disablement of the legacy protocol in vscode-clangd is working as we expect.
================
Comment at: clang-tools-extra/clangd/Protocol.cpp:1339
+ {"paddingRight", H.paddingRight},
+ {"kind", H.kind}};
}
----------------
I think `"kind": null` is formally invalid per spec, it needs to be omitted entirely (the difference between `kind?: InlayHintKind` and `kind: InlayHintKind|null`).
I suspect it'll work fine in practice, but if you want to be really rigorous probably better add it conditionally
================
Comment at: clang-tools-extra/clangd/Protocol.h:1579
+ /// to visually align/separate an inlay hint.
+ bool paddingLeft;
+
----------------
nit: = false to avoid accidentally uninitialized members
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125228/new/
https://reviews.llvm.org/D125228
More information about the cfe-commits
mailing list