forked from qt-creator/qt-creator
Clang: Suppress GCC warning with LLVM 7.0.1
Change-Id: I6de160b42472560a3b33d9a3390b0890eabe9d44 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
cd50fe826d
commit
2379007c17
@@ -11,6 +11,7 @@ Module {
|
||||
|
||||
property stringList hostOS: qbs.hostOS
|
||||
property stringList targetOS: qbs.targetOS
|
||||
property stringList toolchain: qbs.toolchain
|
||||
|
||||
property string llvmConfig
|
||||
property string llvmVersion
|
||||
@@ -38,6 +39,8 @@ Module {
|
||||
llvmToolingDefines = toolingParams.defines;
|
||||
llvmToolingIncludes = toolingParams.includes;
|
||||
llvmToolingCxxFlags = toolingParams.cxxFlags;
|
||||
if (toolchain.contains("gcc"))
|
||||
res.push("-Wno-unused-parameter");
|
||||
llvmFormattingLibs = ClangFunctions.formattingLibs(llvmConfig, QtcFunctions, targetOS);
|
||||
found = llvmConfig && File.exists(llvmIncludeDir.concat("/clang-c/Index.h"));
|
||||
}
|
||||
|
@@ -177,6 +177,7 @@ isEmpty(LLVM_VERSION) {
|
||||
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
|
||||
QMAKE_CXXFLAGS += -Wno-unused-parameter
|
||||
}
|
||||
|
||||
LLVM_LIBDIR = $$quote($$system($$llvm_config --libdir, lines))
|
||||
|
Reference in New Issue
Block a user