CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
76 lines
3.0 KiB
C++
76 lines
3.0 KiB
C++
//===--- SyncAPI.h - Sync version of ClangdServer's API ----------*- C++-*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains synchronous versions of ClangdServer's async API. We
|
|
// deliberately don't expose the sync API outside tests to encourage using the
|
|
// async versions in clangd code.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#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 {
|
|
|
|
// Calls addDocument and then blockUntilIdleForTest.
|
|
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, const std::vector<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)>);
|
|
|
|
} // namespace clangd
|
|
} // namespace clang
|
|
|
|
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_UNITTESTS_SYNCAPI_H
|