clang-tools
6.0.0
|
This file provides the implementation for deduplicating, detecting conflicts in, and applying collections of Replacements. More...
#include "clang-apply-replacements/Tooling/ApplyReplacements.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Format/Format.h"
#include "clang/Lex/Lexer.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/Tooling/DiagnosticsYaml.h"
#include "clang/Tooling/ReplacementsYaml.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Namespaces | |
clang | |
clang::replace | |
Functions | |
static void | eatDiagnostics (const SMDiagnostic &, void *) |
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) |
static void | clang::replace::reportConflict (const FileEntry *File, const llvm::ArrayRef< clang::tooling::Replacement > ConflictingReplacements, SourceManager &SM) |
Dumps information for a sequence of conflicting Replacements. More... | |
bool | clang::replace::applyAllReplacements (const std::vector< tooling::Replacement > &Replaces, Rewriter &Rewrite) |
static void | clang::replace::deduplicate (std::vector< tooling::Replacement > &Replaces, std::vector< tooling::Range > &Conflicts) |
static bool | clang::replace::deduplicateAndDetectConflicts (FileToReplacementsMap &Replacements, SourceManager &SM) |
Deduplicates and tests for conflicts among the replacements for each file in Replacements . 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::mergeAndDeduplicate (const TUDiagnostics &TUs, FileToReplacementsMap &GroupedReplacements, clang::SourceManager &SM) |
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 implementation for deduplicating, detecting conflicts in, and applying collections of Replacements.
FIXME: Use Diagnostics for output instead of llvm::errs().
Definition in file ApplyReplacements.cpp.
|
static |
Definition at line 34 of file ApplyReplacements.cpp.
Referenced by clang::replace::collectReplacementsFromDirectory().