[all-commits] [llvm/llvm-project] 32626b: [clangd] Add ClangdServer::customAction() extensio...
Sam McCall via All-commits
all-commits at lists.llvm.org
Thu Aug 13 03:26:58 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 32626bcc0b9b1180db7eebc46c45faff7905bd05
https://github.com/llvm/llvm-project/commit/32626bcc0b9b1180db7eebc46c45faff7905bd05
Author: Sam McCall <sam.mccall at gmail.com>
Date: 2020-08-13 (Thu, 13 Aug 2020)
Changed paths:
M clang-tools-extra/clangd/ClangdServer.cpp
M clang-tools-extra/clangd/ClangdServer.h
M clang-tools-extra/clangd/unittests/ClangdTests.cpp
M clang-tools-extra/clangd/unittests/SyncAPI.cpp
M clang-tools-extra/clangd/unittests/SyncAPI.h
Log Message:
-----------
[clangd] Add ClangdServer::customAction() extension point
This lets basic AST-consuming actions be defined outside clangdserver.
(it essentially exposes TUScheduler::runWithAST).
Two use cases for now:
- replace ClangdServer::dumpAST, which doesn't really belong in the public
interface (a followup patch will do this)
- allow embedders to add/experiment with extra features
(e.g. I know some who want to try crazy AST+ML code completion...)
Maybe in the future we should use this sort of mechanism to make ClangdServer
less of a monolith, but that's not in scope for now.
This would probably require a richer and more carefully-thought-out API.
Differential Revision: https://reviews.llvm.org/D85883
More information about the All-commits
mailing list