diff options
author | Björn Schäpers <bjoern@hazardy.de> | 2023-02-08 12:31:04 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-02-08 20:41:47 +0000 |
commit | faa289562beb06290ad8066abbc06c685445f9c3 (patch) | |
tree | b8e9d60b3e0aaa43c109503da40d8037d24ffba7 | |
parent | 17c9d1e012198f1ddf63036981068b48e14ab857 (diff) | |
download | qttools-faa289562beb06290ad8066abbc06c685445f9c3.tar.gz |
lupdate: Fix build with clang 16+
The signature changed again.
I've tested it with a current main, that is clang 17, but the commit
854c10f8d185286d941307e1033eb492e085c203 with introduced the change is
also contained in clang 16.
Change-Id: I050ca5843708be4489757538849000d3675005ac
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
(cherry picked from commit 87fac2de7378963e753a847da667d52d4ba95bff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/linguist/lupdate/lupdatepreprocessoraction.cpp | 4 | ||||
-rw-r--r-- | src/linguist/lupdate/lupdatepreprocessoraction.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/linguist/lupdate/lupdatepreprocessoraction.cpp b/src/linguist/lupdate/lupdatepreprocessoraction.cpp index 9733f20d2..97b31ca51 100644 --- a/src/linguist/lupdate/lupdatepreprocessoraction.cpp +++ b/src/linguist/lupdate/lupdatepreprocessoraction.cpp @@ -157,7 +157,9 @@ void LupdatePPCallbacks::SourceRangeSkipped(clang::SourceRange sourceRange, void LupdatePPCallbacks::InclusionDirective(clang::SourceLocation /*hashLoc*/, const clang::Token & /*includeTok*/, clang::StringRef /*fileName*/, bool /*isAngled*/, clang::CharSourceRange /*filenameRange*/, -#if (LUPDATE_CLANG_VERSION >= LUPDATE_CLANG_VERSION_CHECK(15,0,0)) +#if (LUPDATE_CLANG_VERSION >= LUPDATE_CLANG_VERSION_CHECK(16,0,0)) + const clang::OptionalFileEntryRef file, +#elif (LUPDATE_CLANG_VERSION >= LUPDATE_CLANG_VERSION_CHECK(15,0,0)) const clang::Optional<clang::FileEntryRef> file, #else const clang::FileEntry *file, diff --git a/src/linguist/lupdate/lupdatepreprocessoraction.h b/src/linguist/lupdate/lupdatepreprocessoraction.h index 3e44cee83..673ecb495 100644 --- a/src/linguist/lupdate/lupdatepreprocessoraction.h +++ b/src/linguist/lupdate/lupdatepreprocessoraction.h @@ -52,7 +52,9 @@ private: void InclusionDirective(clang::SourceLocation /*hashLoc*/, const clang::Token &/*includeTok*/, clang::StringRef /*fileName*/, bool /*isAngled*/, clang::CharSourceRange /*filenameRange*/, -#if (LUPDATE_CLANG_VERSION >= LUPDATE_CLANG_VERSION_CHECK(15,0,0)) +#if (LUPDATE_CLANG_VERSION >= LUPDATE_CLANG_VERSION_CHECK(16,0,0)) + const clang::OptionalFileEntryRef file, +#elif (LUPDATE_CLANG_VERSION >= LUPDATE_CLANG_VERSION_CHECK(15,0,0)) const clang::Optional<clang::FileEntryRef> file, #else const clang::FileEntry *file, |