summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-07-01 14:08:17 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-01 16:44:13 +0000
commit14b81ebc4bb77d5f5463467ec614ede13e6d1fbe (patch)
tree5908b3ae2d210a11a588bcc03b986edb07254837
parent60182870789a051d11730a7b081edccc52ffa13f (diff)
linguist: work around Clang 10 headers throwing GCC 12 -Werror=nonnull
We can't fix these 3rd-party headers, so disable the warning when including Clang/LLVM headers. Fixes: QTBUG-104713 Change-Id: I7d851a4a4237c3d3500609d2e1f6c8ceb43f204b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit e969141544cbd2c5adce3847d5baa9c98dcf0bc4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/linguist/lupdate/clangtoolastreader.h1
-rw-r--r--src/linguist/lupdate/cpp_clang.h1
-rw-r--r--src/linguist/lupdate/lupdatepreprocessoraction.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/linguist/lupdate/clangtoolastreader.h b/src/linguist/lupdate/clangtoolastreader.h
index 4032bb60d..bded8d46c 100644
--- a/src/linguist/lupdate/clangtoolastreader.h
+++ b/src/linguist/lupdate/clangtoolastreader.h
@@ -36,6 +36,7 @@ QT_WARNING_DISABLE_MSVC(4100)
QT_WARNING_DISABLE_MSVC(4146)
QT_WARNING_DISABLE_MSVC(4267)
QT_WARNING_DISABLE_MSVC(4624)
+QT_WARNING_DISABLE_GCC("-Wnonnull")
#include <clang/AST/RecursiveASTVisitor.h>
#include <clang/Frontend/CompilerInstance.h>
diff --git a/src/linguist/lupdate/cpp_clang.h b/src/linguist/lupdate/cpp_clang.h
index f66e2c858..a5b2d4c46 100644
--- a/src/linguist/lupdate/cpp_clang.h
+++ b/src/linguist/lupdate/cpp_clang.h
@@ -41,6 +41,7 @@ QT_WARNING_DISABLE_MSVC(4100)
QT_WARNING_DISABLE_MSVC(4146)
QT_WARNING_DISABLE_MSVC(4267)
QT_WARNING_DISABLE_MSVC(4624)
+QT_WARNING_DISABLE_GCC("-Wnonnull")
#include <llvm/ADT/StringRef.h>
#include <clang/Basic/SourceLocation.h>
diff --git a/src/linguist/lupdate/lupdatepreprocessoraction.h b/src/linguist/lupdate/lupdatepreprocessoraction.h
index 3cb443c9c..22cd16216 100644
--- a/src/linguist/lupdate/lupdatepreprocessoraction.h
+++ b/src/linguist/lupdate/lupdatepreprocessoraction.h
@@ -37,6 +37,7 @@ QT_WARNING_DISABLE_MSVC(4100)
QT_WARNING_DISABLE_MSVC(4146)
QT_WARNING_DISABLE_MSVC(4267)
QT_WARNING_DISABLE_MSVC(4624)
+QT_WARNING_DISABLE_GCC("-Wnonnull")
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/FrontendActions.h>