diff options
Diffstat (limited to 'clang-tools-extra/clangd/TUScheduler.cpp')
-rw-r--r-- | clang-tools-extra/clangd/TUScheduler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 5e761547f36..a77d226902c 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -860,9 +860,10 @@ bool TUScheduler::blockUntilIdle(Deadline D) const { return true; } -void TUScheduler::update(PathRef File, ParseInputs Inputs, +bool TUScheduler::update(PathRef File, ParseInputs Inputs, WantDiagnostics WantDiags) { std::unique_ptr<FileData> &FD = Files[File]; + bool NewFile = FD == nullptr; if (!FD) { // Create a new worker to process the AST-related tasks. ASTWorkerHandle Worker = ASTWorker::create( @@ -875,6 +876,7 @@ void TUScheduler::update(PathRef File, ParseInputs Inputs, FD->Contents = Inputs.Contents; } FD->Worker->update(std::move(Inputs), WantDiags); + return NewFile; } void TUScheduler::remove(PathRef File) { |