summaryrefslogtreecommitdiff
path: root/src/linguist
diff options
context:
space:
mode:
authorBjörn Schäpers <bjoern@hazardy.de>2023-02-08 12:31:04 +0100
committerBjörn Schäpers <qt-codereview@hazardy.de>2023-02-08 19:48:44 +0000
commit87fac2de7378963e753a847da667d52d4ba95bff (patch)
treeb59f9ac69f93e4b22020ace1703417c7dbf2b8ca /src/linguist
parentdd1f00da0629816d6d4967636440111cc526f478 (diff)
downloadqttools-87fac2de7378963e753a847da667d52d4ba95bff.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. Pick-to: 6.4 6.5 Change-Id: I050ca5843708be4489757538849000d3675005ac Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Diffstat (limited to 'src/linguist')
-rw-r--r--src/linguist/lupdate/lupdatepreprocessoraction.cpp4
-rw-r--r--src/linguist/lupdate/lupdatepreprocessoraction.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/linguist/lupdate/lupdatepreprocessoraction.cpp b/src/linguist/lupdate/lupdatepreprocessoraction.cpp
index d963747d8..478d5fbea 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,