15 #ifndef LLVM_CLANG_TOOLING_REFACTOR_ATOMICCHANGE_H
16 #define LLVM_CLANG_TOOLING_REFACTOR_ATOMICCHANGE_H
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/Support/Error.h"
46 : Key(Key), FilePath(FilePath) {}
56 const std::string &
getKey()
const {
return Key; }
65 void setError(llvm::StringRef Error) { this->Error = Error; }
68 bool hasError()
const {
return !Error.empty(); }
71 const std::string &
getError()
const {
return Error; }
77 llvm::StringRef ReplacementText);
94 llvm::StringRef
Text,
bool InsertAfter =
true);
108 return InsertedHeaders;
112 return RemovedHeaders;
118 AtomicChange(std::string Key, std::string FilePath, std::string Error,
119 std::vector<std::string> InsertedHeaders,
120 std::vector<std::string> RemovedHeaders,
125 std::string FilePath;
127 std::vector<std::string> InsertedHeaders;
128 std::vector<std::string> RemovedHeaders;
135 #endif // LLVM_CLANG_TOOLING_REFACTOR_ATOMICCHANGE_H
Defines the SourceManager interface.
Represents a character-granular source range.
Encodes a location in the source.
This class handles loading and caching of source files into memory.