Skip to content

Commit e6d9b2c

Browse files
committed
[clangd] Remove unused+broken InvalidationError class.
1 parent ea086d1 commit e6d9b2c

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

clang-tools-extra/clangd/TUScheduler.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,15 +1093,5 @@ DebouncePolicy DebouncePolicy::fixed(clock::duration T) {
10931093
return P;
10941094
}
10951095

1096-
void TUScheduler::InvalidatedError::log(llvm::raw_ostream &OS) const {
1097-
switch (Policy) {
1098-
case InvalidateOnUpdate:
1099-
OS << "Task was cancelled due to a subsequent change to the file.";
1100-
break;
1101-
case NoInvalidation:
1102-
llvm_unreachable("Invalidated for no reason?");
1103-
}
1104-
}
1105-
11061096
} // namespace clangd
11071097
} // namespace clang

clang-tools-extra/clangd/TUScheduler.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -230,27 +230,14 @@ class TUScheduler {
230230
InvalidateOnUpdate,
231231
};
232232

233-
/// Error to return when an ASTActionInvalidation policy fires.
234-
class InvalidatedError : public llvm::ErrorInfo<InvalidatedError> {
235-
public:
236-
static char ID;
237-
ASTActionInvalidation Policy;
238-
239-
void log(llvm::raw_ostream &OS) const override;
240-
std::error_code convertToErrorCode() const override {
241-
return std::make_error_code(std::errc::interrupted);
242-
}
243-
};
244-
245233
/// Schedule an async read of the AST. \p Action will be called when AST is
246234
/// ready. The AST passed to \p Action refers to the version of \p File
247235
/// tracked at the time of the call, even if new updates are received before
248236
/// \p Action is executed.
249237
/// If an error occurs during processing, it is forwarded to the \p Action
250238
/// callback.
251-
/// If the context is cancelled before the AST is ready, the callback will
252-
/// receive a CancelledError. If the invalidation policy is triggered, the
253-
/// callback will receive an InvalidatedError.
239+
/// If the context is cancelled before the AST is ready, or the invalidation
240+
/// policy is triggered, the callback will receive a CancelledError.
254241
void runWithAST(llvm::StringRef Name, PathRef File,
255242
Callback<InputsAndAST> Action,
256243
ASTActionInvalidation = NoInvalidation);

0 commit comments

Comments
 (0)