clang-tools 8.0.0

Namespaces | Typedefs | Functions
ApplyReplacements.h File Reference

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>`
Include dependency graph for ApplyReplacements.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
| clang
| ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
| clang::replace

## Typedefs
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< tooling::AtomicChange > > | clang::replace::FileToChangesMap
| Map mapping file name to a set of AtomicChange 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, const TUDiagnostics &TUDs, FileToChangesMap &FileChanges, clang::SourceManager &SM)
| Deduplicate, check for conflicts, and extract all Replacements stored in `TUs`. More...
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. More...
bool | clang::replace::deleteReplacementFiles (const TUReplacementFiles &Files, clang::DiagnosticsEngine &Diagnostics)
| Delete the replacement files. More...

## Detailed Description

This file provides the interface for deduplicating, detecting conflicts in, and applying collections of Replacements.

Definition in file ApplyReplacements.h.