kbobyrev requested changes to this revision. kbobyrev added a comment. This revision now requires changes to proceed.
Yeah, this should be a right approach! Thanks! ================ Comment at: clang/test/clang-rename/NonExistFile.cpp:1 +// RUN: not clang-rename -offset=0 -new-name=plop asdasd 2>&1 | FileCheck %s +// CHECK: clang-rename: input file does not exist. ---------------- Rather than `asdasd` please use a meaningful name (e.g. `non-existing-file`). ================ Comment at: clang/tools/clang-rename/ClangRename.cpp:233 + if (!Entry) { + errs() << "clang-rename: input file does not exist.\n"; + return 1; ---------------- It is worth including the filename in the error message, otherwise it won't be possible to understand which one is missing (there can be multiple IIRC, right?). Also, it's better to put this check to the top of main, where the `OP` if first declared, since this is a sanity check and we want to fail if the inputs are corrupted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148439/new/ https://reviews.llvm.org/D148439 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits