From faa289562beb06290ad8066abbc06c685445f9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Wed, 8 Feb 2023 12:31:04 +0100 Subject: lupdate: Fix build with clang 16+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 87fac2de7378963e753a847da667d52d4ba95bff) Reviewed-by: Qt Cherry-pick Bot --- src/linguist/lupdate/lupdatepreprocessoraction.cpp | 4 +++- 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 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 file, #else const clang::FileEntry *file, -- cgit v1.2.1