diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2019-04-17 17:57:47 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2019-04-23 15:34:01 +0000 |
commit | 8827d83115b5b3c88446dd3ba50341ca3b738c0a (patch) | |
tree | a66a9a368dee8125cf6db815f9d81d3387bd8837 /src | |
parent | a35c5901eaf23fbba0e92d5c99c766c3e9920073 (diff) | |
download | qt-creator-8827d83115b5b3c88446dd3ba50341ca3b738c0a.tar.gz |
Clang: Centralize -Wno-comment for GCC
It's also needed in clangrefactoringbackend, unittest etc...
Change-Id: I9c758d52b34798d75610a4633bc7c5e7ceb0c00b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/clangformat/clangformat.pro | 2 | ||||
-rw-r--r-- | src/plugins/clangformat/clangformat.qbs | 7 | ||||
-rw-r--r-- | src/shared/clang/clang_installation.pri | 3 |
3 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/clangformat/clangformat.pro b/src/plugins/clangformat/clangformat.pro index 653dacdaba..665083e995 100644 --- a/src/plugins/clangformat/clangformat.pro +++ b/src/plugins/clangformat/clangformat.pro @@ -16,8 +16,6 @@ INCLUDEPATH += $$LLVM_INCLUDEPATH QMAKE_CXXFLAGS_WARN_ON *= $$LLVM_CXXFLAGS_WARNINGS QMAKE_CXXFLAGS *= $$LLVM_CXXFLAGS -# clang/Format/Format.h has intentional multiline comments -gcc:QMAKE_CXXFLAGS *= -Wno-comment unix:!macos:QMAKE_LFLAGS += -Wl,--exclude-libs,ALL SOURCES += \ diff --git a/src/plugins/clangformat/clangformat.qbs b/src/plugins/clangformat/clangformat.qbs index 981448577e..5d5fb12885 100644 --- a/src/plugins/clangformat/clangformat.qbs +++ b/src/plugins/clangformat/clangformat.qbs @@ -19,12 +19,7 @@ QtcPlugin { && libclang.llvmFormattingLibs.length && (!qbs.targetOS.contains("windows") || libclang.llvmBuildModeMatches) - cpp.cxxFlags: { - var res = base.concat(libclang.llvmToolingCxxFlags); - if (qbs.toolchain.contains("gcc")) - res.push("-Wno-comment"); // clang/Format/Format.h has intentional multiline comments - return res; - } + cpp.cxxFlags: base.concat(libclang.llvmToolingCxxFlags) cpp.includePaths: base.concat(libclang.llvmIncludeDir) cpp.libraryPaths: base.concat(libclang.llvmLibDir) cpp.dynamicLibraries: base.concat(libclang.llvmFormattingLibs) diff --git a/src/shared/clang/clang_installation.pri b/src/shared/clang/clang_installation.pri index 5352624672..980ad4bff6 100644 --- a/src/shared/clang/clang_installation.pri +++ b/src/shared/clang/clang_installation.pri @@ -176,7 +176,8 @@ 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 + # clang/Format/Format.h has intentional multiline comments + QMAKE_CXXFLAGS += -Wno-unused-parameter -Wno-comment } LLVM_LIBDIR = $$quote($$system($$llvm_config --libdir, lines)) |