Author: Sam McCall Date: 2020-03-05T01:08:40+01:00 New Revision: e6d9b2cb92dd8ad544f43dc97e82fa98e07e977c
URL: https://github.com/llvm/llvm-project/commit/e6d9b2cb92dd8ad544f43dc97e82fa98e07e977c DIFF: https://github.com/llvm/llvm-project/commit/e6d9b2cb92dd8ad544f43dc97e82fa98e07e977c.diff LOG: [clangd] Remove unused+broken InvalidationError class. Added: Modified: clang-tools-extra/clangd/TUScheduler.cpp clang-tools-extra/clangd/TUScheduler.h Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/TUScheduler.cpp b/clang-tools-extra/clangd/TUScheduler.cpp index 714bc7217b8b..2ddfae623677 100644 --- a/clang-tools-extra/clangd/TUScheduler.cpp +++ b/clang-tools-extra/clangd/TUScheduler.cpp @@ -1093,15 +1093,5 @@ DebouncePolicy DebouncePolicy::fixed(clock::duration T) { return P; } -void TUScheduler::InvalidatedError::log(llvm::raw_ostream &OS) const { - switch (Policy) { - case InvalidateOnUpdate: - OS << "Task was cancelled due to a subsequent change to the file."; - break; - case NoInvalidation: - llvm_unreachable("Invalidated for no reason?"); - } -} - } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/clangd/TUScheduler.h b/clang-tools-extra/clangd/TUScheduler.h index 074404c23c11..b2901c42bb62 100644 --- a/clang-tools-extra/clangd/TUScheduler.h +++ b/clang-tools-extra/clangd/TUScheduler.h @@ -230,27 +230,14 @@ class TUScheduler { InvalidateOnUpdate, }; - /// Error to return when an ASTActionInvalidation policy fires. - class InvalidatedError : public llvm::ErrorInfo<InvalidatedError> { - public: - static char ID; - ASTActionInvalidation Policy; - - void log(llvm::raw_ostream &OS) const override; - std::error_code convertToErrorCode() const override { - return std::make_error_code(std::errc::interrupted); - } - }; - /// Schedule an async read of the AST. \p Action will be called when AST is /// ready. The AST passed to \p Action refers to the version of \p File /// tracked at the time of the call, even if new updates are received before /// \p Action is executed. /// If an error occurs during processing, it is forwarded to the \p Action /// callback. - /// If the context is cancelled before the AST is ready, the callback will - /// receive a CancelledError. If the invalidation policy is triggered, the - /// callback will receive an InvalidatedError. + /// If the context is cancelled before the AST is ready, or the invalidation + /// policy is triggered, the callback will receive a CancelledError. void runWithAST(llvm::StringRef Name, PathRef File, Callback<InputsAndAST> Action, ASTActionInvalidation = NoInvalidation); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits