llvm/clang-tools-extra/clangd/unittests/tweaks/TweakTesting.cpp

//===-- TweakTesting.cpp ------------------------------------------------*-===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "TweakTesting.h"

#include "SourceCode.h"
#include "TestTU.h"
#include "refactor/Tweak.h"
#include "llvm/Support/Error.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <optional>
#include <string>

namespace clang {
namespace clangd {
namespace {
Context;

std::pair<llvm::StringRef, llvm::StringRef> wrapping(Context Ctx) {}

std::string wrap(Context Ctx, llvm::StringRef Inner) {}

llvm::StringRef unwrap(Context Ctx, llvm::StringRef Outer) {}

llvm::Annotations::Range rangeOrPoint(const llvm::Annotations &A) {}

// Prepare and apply the specified tweak based on the selection in Input.
// Returns std::nullopt if and only if prepare() failed.
std::optional<llvm::Expected<Tweak::Effect>>
applyTweak(ParsedAST &AST, llvm::Annotations::Range Range, StringRef TweakID,
           const SymbolIndex *Index, llvm::vfs::FileSystem *FS) {}

} // namespace

std::string TweakTest::apply(llvm::StringRef MarkedCode,
                             llvm::StringMap<std::string> *EditedFiles) const {}

bool TweakTest::isAvailable(WrappedAST &AST,
                            llvm::Annotations::Range Range) const {}

TweakTest::WrappedAST TweakTest::build(llvm::StringRef Code) const {}

std::string TweakTest::decorate(llvm::StringRef Code, unsigned Point) {}

std::string TweakTest::decorate(llvm::StringRef Code,
                                llvm::Annotations::Range Range) {}

} // namespace clangd
} // namespace clang