clang-tools
5.0.0
|
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 "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 | |
clang | |
clang::format | |
clang::replace | |
Typedefs | |
typedef std::vector < clang::tooling::Range > | clang::replace::RangeVector |
Collection of source ranges. More... | |
typedef std::vector < clang::tooling::TranslationUnitReplacements > | clang::replace::TUReplacements |
Collection of TranslationUnitReplacements. More... | |
typedef std::vector< std::string > | clang::replace::TUReplacementFiles |
Collection of TranslationUnitReplacement files. More... | |
typedef std::vector < clang::tooling::TranslationUnitDiagnostics > | clang::replace::TUDiagnostics |
Collection of TranslationUniDiagnostics. More... | |
typedef llvm::DenseMap< const clang::FileEntry *, std::vector < clang::tooling::Replacement > > | clang::replace::FileToReplacementsMap |
Map mapping file name to Replacements targeting that file. More... | |
Functions | |
std::error_code | clang::replace::collectReplacementsFromDirectory (const llvm::StringRef Directory, TUReplacements &TUs, TUReplacementFiles &TUFiles, clang::DiagnosticsEngine &Diagnostics) |
Recursively descends through a directory structure rooted at Directory and attempts to deserialize *.yaml files as TranslationUnitReplacements. More... | |
std::error_code | clang::replace::collectReplacementsFromDirectory (const llvm::StringRef Directory, TUDiagnostics &TUs, TUReplacementFiles &TUFiles, clang::DiagnosticsEngine &Diagnostics) |
bool | clang::replace::mergeAndDeduplicate (const TUReplacements &TUs, FileToReplacementsMap &GroupedReplacements, clang::SourceManager &SM) |
Deduplicate, check for conflicts, and apply all Replacements stored in TUs . More... | |
bool | clang::replace::mergeAndDeduplicate (const TUDiagnostics &TUs, FileToReplacementsMap &GroupedReplacements, clang::SourceManager &SM) |
bool | clang::replace::applyAllReplacements (const std::vector< tooling::Replacement > &Replaces, Rewriter &Rewrite) |
bool | clang::replace::applyReplacements (const FileToReplacementsMap &GroupedReplacements, clang::Rewriter &Rewrites) |
Apply all replacements in GroupedReplacements . More... | |
RangeVector | clang::replace::calculateChangedRanges (const std::vector< clang::tooling::Replacement > &Replacements) |
Given a collection of Replacements for a single file, produces a list of source ranges that enclose those Replacements. More... | |
bool | clang::replace::writeFiles (const clang::Rewriter &Rewrites) |
Write the contents of FileContents to disk. More... | |
bool | clang::replace::deleteReplacementFiles (const TUReplacementFiles &Files, clang::DiagnosticsEngine &Diagnostics) |
Delete the replacement files. More... | |
This file provides the interface for deduplicating, detecting conflicts in, and applying collections of Replacements.
Definition in file ApplyReplacements.h.