[clang-rename] Exit gracefully when no input provided
clang-rename on a non existing file segfaults Command to run - $ clang-rename -offset=0 -new-name=plop asdasd Error while processing llvm-project/asdasd. clang-rename: llvm-project/llvm/include/llvm/Support/ErrorOr.h:237: llvm::ErrorOr<T>::storage_type* llvm::ErrorOr<T>::getStorage() [with T = const clang::FileEntry*; llvm::ErrorOr<T>::storage_type = const clang::FileEntry*]: Assertion `!HasError && "Cannot get value when an error exists!"' failed. [1] 827497 IOT instruction clang-rename -offset=0 -new-name=plop asdasd This fixes https://github.com/llvm/llvm-project/issues/36471. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D148439
Loading
Please sign in to comment