diff options
| author | Haojian Wu <hokein@google.com> | 2018-12-06 09:41:04 +0000 |
|---|---|---|
| committer | Haojian Wu <hokein@google.com> | 2018-12-06 09:41:04 +0000 |
| commit | ec3d02013fcd398720300d3d3ef235135287a055 (patch) | |
| tree | 0883cf726249f1c20880fbaaf7155b5a316a69ef /clang-tools-extra/clangd/ClangdServer.cpp | |
| parent | 46b421e5e3f2d2e4fe0d64265e048deeb2362879 (diff) | |
| download | bcm5719-llvm-ec3d02013fcd398720300d3d3ef235135287a055.tar.gz bcm5719-llvm-ec3d02013fcd398720300d3d3ef235135287a055.zip | |
[clangd] C++ API for emitting file status.
Introduce clangd C++ API to emit the current status of file.
llvm-svn: 348475
Diffstat (limited to 'clang-tools-extra/clangd/ClangdServer.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/ClangdServer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index 4a8c7c2587d..79223f2ab85 100644 --- a/clang-tools-extra/clangd/ClangdServer.cpp +++ b/clang-tools-extra/clangd/ClangdServer.cpp @@ -86,6 +86,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { DiagConsumer.onDiagnosticsReady(File, std::move(Diags)); } + void onFileUpdated(PathRef File, const TUStatus &Status) override { + DiagConsumer.onFileUpdated(File, Status); + } + private: FileIndex *FIndex; DiagnosticsConsumer &DiagConsumer; @@ -144,6 +148,10 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB, void ClangdServer::addDocument(PathRef File, StringRef Contents, WantDiagnostics WantDiags) { + // FIXME: some build systems like Bazel will take time to preparing + // environment to build the file, it would be nice if we could emit a + // "PreparingBuild" status to inform users, it is non-trivial given the + // current implementation. WorkScheduler.update(File, ParseInputs{getCompileCommand(File), FSProvider.getFileSystem(), Contents.str()}, |

