clang-tools 20.0.0git
|
This file provides the interface for deduplicating, detecting conflicts in, and applying collections of Replacements. More...
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/Refactoring.h"
#include "clang/Tooling/Refactoring/AtomicChange.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include <string>
#include <system_error>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | clang |
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===// | |
namespace | clang::replace |
Typedefs | |
typedef std::vector< clang::tooling::TranslationUnitReplacements > | clang::replace::TUReplacements |
Collection of TranslationUnitReplacements. | |
typedef std::vector< std::string > | clang::replace::TUReplacementFiles |
Collection of TranslationUnitReplacement files. | |
typedef std::vector< clang::tooling::TranslationUnitDiagnostics > | clang::replace::TUDiagnostics |
Collection of TranslationUniDiagnostics. | |
using | clang::replace::FileToChangesMap = llvm::DenseMap< clang::FileEntryRef, std::vector< tooling::AtomicChange > > |
Map mapping file name to a set of AtomicChange targeting that file. | |
Functions | |
template<typename TranslationUnits > | |
std::error_code | clang::replace::collectReplacementsFromDirectory (const llvm::StringRef Directory, TranslationUnits &TUs, TUReplacementFiles &TUFiles, clang::DiagnosticsEngine &Diagnostics)=delete |
Recursively descends through a directory structure rooted at Directory and attempts to deserialize *.yaml files as TranslationUnitReplacements. | |
template<> | |
std::error_code | clang::replace::collectReplacementsFromDirectory (const llvm::StringRef Directory, TUReplacements &TUs, TUReplacementFiles &TUFiles, clang::DiagnosticsEngine &Diagnostics) |
template<> | |
std::error_code | clang::replace::collectReplacementsFromDirectory (const llvm::StringRef Directory, TUDiagnostics &TUs, TUReplacementFiles &TUFiles, clang::DiagnosticsEngine &Diagnostics) |
bool | clang::replace::mergeAndDeduplicate (const TUReplacements &TUs, const TUDiagnostics &TUDs, FileToChangesMap &FileChanges, clang::SourceManager &SM, bool IgnoreInsertConflict=false) |
Deduplicate, check for conflicts, and extract all Replacements stored in TUs . | |
llvm::Expected< std::string > | clang::replace::applyChanges (StringRef File, const std::vector< tooling::AtomicChange > &Changes, const tooling::ApplyChangesSpec &Spec, DiagnosticsEngine &Diagnostics) |
Apply AtomicChange on File and rewrite it. | |
bool | clang::replace::deleteReplacementFiles (const TUReplacementFiles &Files, clang::DiagnosticsEngine &Diagnostics) |
Delete the replacement files. | |
This file provides the interface for deduplicating, detecting conflicts in, and applying collections of Replacements.
Definition in file ApplyReplacements.h.