================
@@ -843,7 +843,7 @@ void ClangMoveTool::moveDeclsToNewFiles() {
// Move all contents from OldFile to NewFile.
void ClangMoveTool::moveAll(SourceManager &SM, StringRef OldFile,
StringRef NewFile) {
- auto FE = SM.getFileManager().getFile(makeAbsolutePath(OldFile));
+ auto FE = SM.getFileManager().getOptionalFileRef(makeAbsolutePath(OldFile));
if (!FE) {
llvm::errs() << "Failed to get file: " << OldFile << "\n";
----------------
benlangmuir wrote:
Recommend `getFileRef` and then print the error message as well if it fails.
https://github.com/llvm/llvm-project/pull/67838
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits