#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) { … }
std::optional<llvm::Expected<Tweak::Effect>>
applyTweak(ParsedAST &AST, llvm::Annotations::Range Range, StringRef TweakID,
const SymbolIndex *Index, llvm::vfs::FileSystem *FS) { … }
}
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) { … }
}
}