[clang-tools-extra] [clangd] Add kernel-doc hover support (PR #198529)
Marc-Andre Lureau via cfe-commits
cfe-commits at lists.llvm.org
Wed May 20 00:05:54 PDT 2026
=?utf-8?q?Marc-André?= Lureau <marcandre.lureau at redhat.com>,
=?utf-8?q?Marc-André?= Lureau <marcandre.lureau at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/198529 at github.com>
elmarco wrote:
> Can we implement this functionality using `ConstCommentVisitor` like we do for doxygen comments? Maybe we can reuse some parts of it.
ConstCommentVisitor parses Doxygen. Kernel-doc is different enough that it won't produce the right AST nodes: @param_name: becomes an unknown command, %CONSTANT/&struct->member/function() inline markup has no Doxygen equivalent, and section headers like Context: aren't recognized commands.
We could preprocess kernel-doc into Doxygen syntax first, but the inline markup cases contain characters that break Clang's word-boundary scanning for \c/\p, so they'd need a separate handling path anyway. At that point the preprocessing becomes complex enough that it's not clearly simpler than the current dedicated parser.
https://github.com/llvm/llvm-project/pull/198529
More information about the cfe-commits
mailing list