Index: clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp =================================================================== --- clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp +++ clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp @@ -289,9 +289,11 @@ // Use the file manager to deduplicate paths. FileEntries are // automatically canonicalized. const FileEntry *Entry = SM.getFileManager().getFile(R.getFilePath()); - if (!Entry && Warned.insert(R.getFilePath()).second) { - errs() << "Described file '" << R.getFilePath() - << "' doesn't exist. Ignoring...\n"; + if (!Entry) { + if (Warned.insert(R.getFilePath()).second) { + errs() << "Described file '" << R.getFilePath() + << "' doesn't exist. Ignoring...\n"; + } continue; } GroupedReplacements[Entry].push_back(R); @@ -315,9 +317,11 @@ // Use the file manager to deduplicate paths. FileEntries are // automatically canonicalized. const FileEntry *Entry = SM.getFileManager().getFile(R.getFilePath()); - if (!Entry && Warned.insert(R.getFilePath()).second) { - errs() << "Described file '" << R.getFilePath() - << "' doesn't exist. Ignoring...\n"; + if (!Entry) { + if (Warned.insert(R.getFilePath()).second) { + errs() << "Described file '" << R.getFilePath() + << "' doesn't exist. Ignoring...\n"; + } continue; } GroupedReplacements[Entry].push_back(R);