// Write replacements to disk.
Rewriter Rewrites(SM, LangOptions());
- for (const auto Replacement : FixerReplacements) {
+ for (const auto &Replacement : FixerReplacements) {
if (!tooling::applyAllReplacements(Replacement, Rewrites)) {
llvm::errs() << "Failed to apply replacements.\n";
return 1;
for (unsigned i = 0, e = AnnotatedLines.size(); i != e; ++i) {
delete AnnotatedLines[i];
}
- for (auto R : RunResult) {
+ for (const auto &R : RunResult) {
auto Err = Result.add(R);
// FIXME: better error handling here. For now, simply return an empty
// Replacements to indicate failure.