#include "clang/Tooling/Refactoring.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/TextDiagnosticPrinter.h"
#include "clang/Lex/Lexer.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_os_ostream.h"
namespace clang {
namespace tooling {
RefactoringTool::RefactoringTool(
const CompilationDatabase &Compilations, ArrayRef<std::string> SourcePaths,
std::shared_ptr<PCHContainerOperations> PCHContainerOps)
: … { … }
std::map<std::string, Replacements> &RefactoringTool::getReplacements() { … }
int RefactoringTool::runAndSave(FrontendActionFactory *ActionFactory) { … }
bool RefactoringTool::applyAllReplacements(Rewriter &Rewrite) { … }
int RefactoringTool::saveRewrittenFiles(Rewriter &Rewrite) { … }
bool formatAndApplyAllReplacements(
const std::map<std::string, Replacements> &FileToReplaces,
Rewriter &Rewrite, StringRef Style) { … }
}
}