#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_SYNCAPI_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_SYNCAPI_H
#include "ClangdServer.h"
#include "Protocol.h"
#include "index/Index.h"
#include <optional>
namespace clang {
namespace clangd {
void runAddDocument(ClangdServer &Server, PathRef File, StringRef Contents,
StringRef Version = "null",
WantDiagnostics WantDiags = WantDiagnostics::Auto,
bool ForceRebuild = false);
llvm::Expected<CodeCompleteResult>
runCodeComplete(ClangdServer &Server, PathRef File, Position Pos,
clangd::CodeCompleteOptions Opts);
llvm::Expected<SignatureHelp> runSignatureHelp(ClangdServer &Server,
PathRef File, Position Pos,
MarkupKind DocumentationFormat);
llvm::Expected<std::vector<LocatedSymbol>>
runLocateSymbolAt(ClangdServer &Server, PathRef File, Position Pos);
llvm::Expected<std::vector<DocumentHighlight>>
runFindDocumentHighlights(ClangdServer &Server, PathRef File, Position Pos);
llvm::Expected<RenameResult> runRename(ClangdServer &Server, PathRef File,
Position Pos, StringRef NewName,
const clangd::RenameOptions &RenameOpts);
llvm::Expected<RenameResult>
runPrepareRename(ClangdServer &Server, PathRef File, Position Pos,
std::optional<std::string> NewName,
const clangd::RenameOptions &RenameOpts);
llvm::Expected<tooling::Replacements>
runFormatFile(ClangdServer &Server, PathRef File, std::optional<Range>);
SymbolSlab runFuzzyFind(const SymbolIndex &Index, StringRef Query);
SymbolSlab runFuzzyFind(const SymbolIndex &Index, const FuzzyFindRequest &Req);
RefSlab getRefs(const SymbolIndex &Index, SymbolID ID);
llvm::Expected<std::vector<SelectionRange>>
runSemanticRanges(ClangdServer &Server, PathRef File,
const std::vector<Position> &Pos);
llvm::Expected<std::optional<clangd::Path>>
runSwitchHeaderSource(ClangdServer &Server, PathRef File);
llvm::Error runCustomAction(ClangdServer &Server, PathRef File,
llvm::function_ref<void(InputsAndAST)>);
}
}
#endif