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.
Rather than asdasd please use a meaningful name (e.g. non-existing-file).