#include "clang/Tooling/Refactoring/AtomicChange.h"
#include "clang/Tooling/ReplacementsYaml.h"
#include "llvm/Support/YAMLTraits.h"
#include <string>
LLVM_YAML_IS_SEQUENCE_VECTOR(clang::tooling::AtomicChange)
namespace {
struct NormalizedAtomicChange { … };
}
namespace llvm {
namespace yaml {
template <> struct MappingTraits<NormalizedAtomicChange> { … };
template <> struct MappingTraits<clang::tooling::AtomicChange> { … };
}
}
namespace clang {
namespace tooling {
namespace {
bool violatesColumnLimit(llvm::StringRef Code, unsigned ColumnLimit,
unsigned Start, unsigned End) { … }
std::vector<Range>
getRangesForFormatting(llvm::StringRef Code, unsigned ColumnLimit,
ApplyChangesSpec::FormatOption Format,
const clang::tooling::Replacements &Replaces) { … }
inline llvm::Error make_string_error(const llvm::Twine &Message) { … }
llvm::Expected<Replacements>
createReplacementsForHeaders(llvm::StringRef FilePath, llvm::StringRef Code,
llvm::ArrayRef<AtomicChange> Changes,
const format::FormatStyle &Style) { … }
llvm::Expected<Replacements>
combineReplacementsInChanges(llvm::StringRef FilePath,
llvm::ArrayRef<AtomicChange> Changes) { … }
}
AtomicChange::AtomicChange(const SourceManager &SM,
SourceLocation KeyPosition) { … }
AtomicChange::AtomicChange(const SourceManager &SM, SourceLocation KeyPosition,
llvm::Any M)
: … { … }
AtomicChange::AtomicChange(std::string Key, std::string FilePath,
std::string Error,
std::vector<std::string> InsertedHeaders,
std::vector<std::string> RemovedHeaders,
clang::tooling::Replacements Replaces)
: … { … }
bool AtomicChange::operator==(const AtomicChange &Other) const { … }
std::string AtomicChange::toYAMLString() { … }
AtomicChange AtomicChange::convertFromYAML(llvm::StringRef YAMLContent) { … }
llvm::Error AtomicChange::replace(const SourceManager &SM,
const CharSourceRange &Range,
llvm::StringRef ReplacementText) { … }
llvm::Error AtomicChange::replace(const SourceManager &SM, SourceLocation Loc,
unsigned Length, llvm::StringRef Text) { … }
llvm::Error AtomicChange::insert(const SourceManager &SM, SourceLocation Loc,
llvm::StringRef Text, bool InsertAfter) { … }
void AtomicChange::addHeader(llvm::StringRef Header) { … }
void AtomicChange::removeHeader(llvm::StringRef Header) { … }
llvm::Expected<std::string>
applyAtomicChanges(llvm::StringRef FilePath, llvm::StringRef Code,
llvm::ArrayRef<AtomicChange> Changes,
const ApplyChangesSpec &Spec) { … }
}
}