Lines Matching defs:AtomicChange

1 //===--- AtomicChange.cpp - AtomicChange implementation ---------*- C++ -*-===//
9 #include "clang/Tooling/Refactoring/AtomicChange.h"
14 LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::AtomicChange)
17 /// Helper to (de)serialize an AtomicChange since we don't have direct
19 /// Data members of a normalized AtomicChange can be directly mapped from/to
26 // This converts AtomicChange's internal implementation of the replacements
29 const clang::tooling::AtomicChange &E)
36 clang::tooling::AtomicChange denormalize(const llvm::yaml::IO &) {
37 llvm_unreachable("Do not convert YAML to AtomicChange directly with '>>'. "
38 "Use AtomicChange::convertFromYAML instead.");
52 /// Specialized MappingTraits to describe how an AtomicChange is
65 /// Specialized MappingTraits to describe how an AtomicChange is
67 template <> struct MappingTraits<clang::tooling::AtomicChange> {
68 static void mapping(IO &Io, clang::tooling::AtomicChange &Doc) {
69 MappingNormalization<NormalizedAtomicChange, clang::tooling::AtomicChange>
145 llvm::ArrayRef<AtomicChange> Changes,
184 llvm::ArrayRef<AtomicChange> Changes) {
196 AtomicChange::AtomicChange(const SourceManager &SM,
202 assert(FE && "Cannot create AtomicChange with invalid location.");
207 AtomicChange::AtomicChange(const SourceManager &SM, SourceLocation KeyPosition,
209 : AtomicChange(SM, KeyPosition) {
213 AtomicChange::AtomicChange(std::string Key, std::string FilePath,
223 bool AtomicChange::operator==(const AtomicChange &Other) const {
232 std::string AtomicChange::toYAMLString() {
241 AtomicChange AtomicChange::convertFromYAML(llvm::StringRef YAMLContent) {
245 AtomicChange E(NE.Key, NE.FilePath, NE.Error, NE.InsertedHeaders,
251 "Failed to add replacement when Converting YAML to AtomicChange.");
257 llvm::Error AtomicChange::replace(const SourceManager &SM,
263 llvm::Error AtomicChange::replace(const SourceManager &SM, SourceLocation Loc,
268 llvm::Error AtomicChange::insert(const SourceManager &SM, SourceLocation Loc,
291 void AtomicChange::addHeader(llvm::StringRef Header) {
295 void AtomicChange::removeHeader(llvm::StringRef Header) {
301 llvm::ArrayRef<AtomicChange> Changes,