diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-04-15 20:10:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-04-15 21:05:03 +0200 |
commit | 4cc5ceb9e3349fccc8ba08fdacb444ae70c597eb (patch) | |
tree | 0d9d2849c85ae11bda30d791572b9e979a874190 /compilerplugins | |
parent | d1da1c59d196b7f6037b7e0820b81fc527d56a4c (diff) |
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>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/includeform.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compilerplugins/clang/includeform.cxx b/compilerplugins/clang/includeform.cxx index d9e603351783..7b2c0feb07ea 100644 --- a/compilerplugins/clang/includeform.cxx +++ b/compilerplugins/clang/includeform.cxx @@ -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) |