aaron.ballman added a comment. Can you add a test case for this functionality?
================ Comment at: clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp:52 +static cl::opt<bool> ForceOverwriteReadOnly( + "force", cl::desc("Overwrite read-only files when applying replacements\n"), + cl::init(false), cl::cat(ReplacementCategory)); ---------------- Missing full stop at the end of the string. Also, it looks like this is doing something subtly different than what the help text says. It looks like this is overwriting the *permissions* of the file when applying replacements. Nothing seems to reset the permissions back to what they once were when the file is closed. Is that accurate? ================ Comment at: clang-tools-extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp:161 + using namespace llvm::sys::fs; + if (auto ErrorOrPerms = getPermissions(FileName)) { + perms P = ErrorOrPerms.get(); ---------------- Rather than spell out the type in the declaration name but use `auto`, how about: `ErrorOr<perms> EP` or something? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70553/new/ https://reviews.llvm.org/D70553 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits