[clang-tools-extra] [clang] NFCI: Use `FileEntryRef` for `FileID` creation (PR #67838)

Ben Langmuir via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 11:01:48 PDT 2023


================
@@ -228,7 +228,7 @@ int main(int argc, const char **argv) {
 
     Tool.applyAllReplacements(Rewrite);
     for (const auto &File : Files) {
-      auto Entry = FileMgr.getFile(File);
+      auto Entry = FileMgr.getOptionalFileRef(File);
----------------
benlangmuir wrote:

Another place we could use `getFileRef` and print the error message.

https://github.com/llvm/llvm-project/pull/67838


More information about the cfe-commits mailing list