Adapt to clang::PPCallbacks::InclusionDirective change in Clang 15 trunk
<https://github.com/llvm/llvm-project/commit/d79ad2f1dbc2db63121620f55d6cfa915f2733ac> "[clang][lex] NFCI: Use FileEntryRef in PPCallbacks::InclusionDirective()" Change-Id: Ib2ea325cca3be03d3b5dfb9dfc3d870be659b129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133085 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -28,13 +28,18 @@ private:
|
||||
|
||||
void InclusionDirective(
|
||||
SourceLocation HashLoc, Token const & IncludeTok, StringRef,
|
||||
bool IsAngled, CharSourceRange FilenameRange, FileEntry const * File,
|
||||
bool IsAngled, CharSourceRange FilenameRange,
|
||||
#if CLANG_VERSION >= 150000
|
||||
Optional<FileEntryRef> File,
|
||||
#else
|
||||
FileEntry const * File,
|
||||
#endif
|
||||
StringRef SearchPath, StringRef, clang::Module const *, SrcMgr::CharacteristicKind) override
|
||||
{
|
||||
if (ignoreLocation(HashLoc)) {
|
||||
return;
|
||||
}
|
||||
if (File == nullptr) { // in case of "fatal error: '...' file not found"
|
||||
if (!File) { // in case of "fatal error: '...' file not found"
|
||||
return;
|
||||
}
|
||||
if (IncludeTok.getIdentifierInfo()->getPPKeywordID() != tok::pp_include)
|
||||
|
||||
Reference in New Issue
Block a user