diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2024-09-25 10:36:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-25 10:36:44 -0700 |
commit | b1aea98cfa357e23f4bb52232da5f41781f23bff (patch) | |
tree | 7fc6ae22d4317dfaafa1f01432265d566b89c67a /clang/lib/Frontend/ASTUnit.cpp | |
parent | abe0dd195a3b2630afdc5c1c233eb2a068b2d72f (diff) | |
download | llvm-b1aea98cfa357e23f4bb52232da5f41781f23bff.zip llvm-b1aea98cfa357e23f4bb52232da5f41781f23bff.tar.gz llvm-b1aea98cfa357e23f4bb52232da5f41781f23bff.tar.bz2 |
[clang] Make deprecations of some `FileManager` APIs formal (#110014)
Some `FileManager` APIs still return `{File,Directory}Entry` instead of
the preferred `{File,Directory}EntryRef`. These are documented to be
deprecated, but don't have the attribute that warns on their usage. This
PR marks them as such with `LLVM_DEPRECATED()` and replaces their usage
with the recommended counterparts. NFCI.
Diffstat (limited to 'clang/lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | clang/lib/Frontend/ASTUnit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 93836ec..bffff0d 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -2395,7 +2395,7 @@ void ASTUnit::TranslateStoredDiagnostics( // Rebuild the StoredDiagnostic. if (SD.Filename.empty()) continue; - auto FE = FileMgr.getFile(SD.Filename); + auto FE = FileMgr.getOptionalFileRef(SD.Filename); if (!FE) continue; SourceLocation FileLoc; |