Clang: Suppress class-memaccess warnings for GCC8

They appear a lot in Clang headers. Until this is fixed in Clang, suppress
them.

Change-Id: I5292ae442089aec3f52ba846ee21e0bd9e61d0cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Orgad Shaneh
2018-07-10 23:11:21 +03:00
committed by Orgad Shaneh
parent 69f75036ab
commit 10fc3595a3

View File

@@ -107,6 +107,15 @@ isEmpty(LLVM_VERSION) {
"LLVM/Clang version >= 6.0.0 required, version provided: $$LLVM_VERSION")
LLVM_VERSION =
} else {
# CLANG-UPGRADE-CHECK: Remove suppression if this warning is resolved.
gcc {
# GCC6 shows full version (6.4.0), while GCC7 and up show only major version (8)
GCC_VERSION = $$system("$$QMAKE_CXX -dumpversion")
GCC_MAJOR_VERSION = $$section(GCC_VERSION, ., 0, 0)
# GCC8 warns about memset/memcpy for types with copy ctor. Clang has some of these.
greaterThan(GCC_MAJOR_VERSION, 7):QMAKE_CXXFLAGS += -Wno-class-memaccess
}
LLVM_LIBDIR = $$quote($$system($$llvm_config --libdir, lines))
LLVM_BINDIR = $$quote($$system($$llvm_config --bindir, lines))
LLVM_INCLUDEPATH = $$system($$llvm_config --includedir, lines)