[clang compat] Adopt OptionalFileEntryRef
Clang 854c10f8d185286d941307e1033eb492e085c203 changed PPCallbacks::InclusionDirective and Preprocessor::LookupFile to use clang::OptionalFileEntryRef instead of llvm::Optional<FileEntryRef>. Update our overrides and calls to match.
This commit is contained in:
parent
3511ccdedd
commit
e28a2853e7
5
iwyu.cc
5
iwyu.cc
|
@ -2421,10 +2421,9 @@ class IwyuBaseAstVisitor : public BaseAstVisitor<Derived> {
|
|||
// parse it to '<new>' before using, so any path that does
|
||||
// that, and is clearly a c++ path, is fine; its exact
|
||||
// contents don't matter that much.
|
||||
using clang::Optional;
|
||||
using clang::FileEntryRef;
|
||||
using clang::OptionalFileEntryRef;
|
||||
const FileEntry* use_file = CurrentFileEntry();
|
||||
Optional<FileEntryRef> file = compiler()->getPreprocessor().LookupFile(
|
||||
OptionalFileEntryRef file = compiler()->getPreprocessor().LookupFile(
|
||||
CurrentLoc(), "new", true, nullptr, use_file, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr, false);
|
||||
if (file) {
|
||||
|
|
|
@ -701,7 +701,7 @@ void IwyuPreprocessorInfo::InclusionDirective(
|
|||
StringRef filename,
|
||||
bool is_angled,
|
||||
clang::CharSourceRange filename_range,
|
||||
Optional<FileEntryRef> file,
|
||||
clang::OptionalFileEntryRef file,
|
||||
StringRef search_path,
|
||||
StringRef relative_path,
|
||||
const clang::Module* imported,
|
||||
|
|
|
@ -202,7 +202,7 @@ class IwyuPreprocessorInfo : public clang::PPCallbacks,
|
|||
llvm::StringRef filename,
|
||||
bool is_angled,
|
||||
clang::CharSourceRange filename_range,
|
||||
llvm::Optional<clang::FileEntryRef> file,
|
||||
clang::OptionalFileEntryRef file,
|
||||
llvm::StringRef search_path,
|
||||
llvm::StringRef relative_path,
|
||||
const clang::Module* imported,
|
||||
|
|
Loading…
Reference in New Issue