clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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/Refactoring.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
| 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 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 &TURFiles, clang::DiagnosticsEngine &Diagnostics)
| Recursively descends through a directory structure rooted at `Directory` and attempts to deserialize *.yaml files as TranslationUnitReplacements. More...
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::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...

## Detailed Description

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

Definition in file ApplyReplacements.h.