[PATCH] D116514: [clangd] Add code action to generate a constructor for a C++ class
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 1 14:42:24 PDT 2022
sammccall added a comment.
Thanks!
In D116514#3423420 <https://reviews.llvm.org/D116514#3423420>, @avogelsgesang wrote:
>> Not easy to do in this patch, we don't have a good way to associate fixes with clang diagnostics yet.
>
> Is this a clangd-specific implementation issue or a general short-coming in the LSP protocol?
It's a clangd thing, tweaks and diagnostics just don't know about each other at all (diagnostics come fully-formed out of the clang internals, tweaks are an isolated traversal of the AST (possibly a different version).
We can't really change the way the diagnostics are generated, so we'd have to store them and do some pattern matching.
(Clangd does have many fixes that are tightly integrated with diagnostics, these are implemented inside clang. Something as big as generating a constructor is out of scope for clang)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116514/new/
https://reviews.llvm.org/D116514
More information about the cfe-commits
mailing list