[clang] dfce185 - [clang] NFCI: Use `FileEntryRef` in `VerifyDiagnosticConsumer`
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Wed May 31 12:17:46 PDT 2023
Author: Jan Svoboda
Date: 2023-05-31T12:17:37-07:00
New Revision: dfce18506b7a9354ddc6706c9ca12644a7be9767
URL: https://github.com/llvm/llvm-project/commit/dfce18506b7a9354ddc6706c9ca12644a7be9767
DIFF: https://github.com/llvm/llvm-project/commit/dfce18506b7a9354ddc6706c9ca12644a7be9767.diff
LOG: [clang] NFCI: Use `FileEntryRef` in `VerifyDiagnosticConsumer`
This is a prep patch that enables removal of some calls to the deprecated `{File,Directory}Entry::getName()`.
Added:
Modified:
clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
Removed:
################################################################################
diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
index 378f7ddd0159f..d57b27e9e36fc 100644
--- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
+++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
@@ -737,12 +737,12 @@ void VerifyDiagnosticConsumer::HandleDiagnostic(
Loc = SrcManager->getExpansionLoc(Loc);
FileID FID = SrcManager->getFileID(Loc);
- const FileEntry *FE = SrcManager->getFileEntryForID(FID);
+ auto FE = SrcManager->getFileEntryRefForID(FID);
if (FE && CurrentPreprocessor && SrcManager->isLoadedFileID(FID)) {
// If the file is a modules header file it shall not be parsed
// for expected-* directives.
HeaderSearch &HS = CurrentPreprocessor->getHeaderSearchInfo();
- if (HS.findModuleForHeader(FE))
+ if (HS.findModuleForHeader(*FE))
PS = IsUnparsedNoDirectives;
}
More information about the cfe-commits
mailing list