diff options
author | Daniel Cheng <dcheng@chromium.org> | 2015-07-10 22:16:19 -0700 |
---|---|---|
committer | Daniel Cheng <dcheng@chromium.org> | 2015-07-11 05:18:17 +0000 |
commit | be8d6f52672bf61324b2ac988ef7776ade9d1628 (patch) | |
tree | 6a4c28fc16b6d8a74f7b9b59af27563ad44b5ec3 | |
parent | 59ef9be12ee89bc452b83bec060d90514dc86c66 (diff) | |
download | chromium_src-be8d6f52672bf61324b2ac988ef7776ade9d1628.zip chromium_src-be8d6f52672bf61324b2ac988ef7776ade9d1628.tar.gz chromium_src-be8d6f52672bf61324b2ac988ef7776ade9d1628.tar.bz2 |
Enable -Wextra-tokens on win clang.
This warns on code of the form:
#endif RANDOM_TEXT
MIDL generated code tends to emit code in this pattern, so suppress
this warning when compiling MIDL generated files.
BUG=504663
R=thakis@chromium.org
TBR=dtseng, robertshield, weitaosu
Review URL: https://codereview.chromium.org/1233453008
Cr-Commit-Position: refs/heads/master@{#338435}
-rw-r--r-- | build/common.gypi | 1 | ||||
-rw-r--r-- | build/config/compiler/BUILD.gn | 1 | ||||
-rw-r--r-- | build/toolchain/win/midl.gni | 8 | ||||
-rw-r--r-- | google_update/google_update.gyp | 6 | ||||
-rw-r--r-- | remoting/remoting_host_win.gypi | 6 | ||||
-rw-r--r-- | third_party/iaccessible2/iaccessible2.gyp | 6 | ||||
-rw-r--r-- | third_party/isimpledom/isimpledom.gyp | 4 |
7 files changed, 30 insertions, 2 deletions
diff --git a/build/common.gypi b/build/common.gypi index 84108fd..9caa814 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -5729,7 +5729,6 @@ # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 '-Qunused-arguments', # http://crbug.com/504658 - '-Wno-extra-tokens', # http://crbug.com/504663 '-Wno-microsoft', # http://crbug.com/505296 '-Wno-pointer-sign', # http://crbug.com/505303 '-Wno-switch', # http://crbug.com/505308 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 6093518..377f99a 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -799,7 +799,6 @@ if (is_win) { default_warning_flags += [ # TODO(hans): Make this list shorter eventually, http://crbug.com/504657 "-Qunused-arguments", # http://crbug.com/504658 - "-Wno-extra-tokens", # http://crbug.com/504663 "-Wno-microsoft", # http://crbug.com/505296 "-Wno-pointer-sign", # http://crbug.com/505303 "-Wno-switch", # http://crbug.com/505308 diff --git a/build/toolchain/win/midl.gni b/build/toolchain/win/midl.gni index 197f366..3e7fbec 100644 --- a/build/toolchain/win/midl.gni +++ b/build/toolchain/win/midl.gni @@ -101,5 +101,13 @@ template("midl") { public_deps = [ ":$action_name", ] + + config("midl_warnings") { + if (is_clang) { + # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" + cflags = [ "-Wno-extra-tokens" ] + } + } + configs += [ ":midl_warnings" ] } } diff --git a/google_update/google_update.gyp b/google_update/google_update.gyp index c3e76d8..990f7e4 100644 --- a/google_update/google_update.gyp +++ b/google_update/google_update.gyp @@ -7,6 +7,12 @@ { 'target_name': 'google_update', 'type': 'static_library', + 'variables': { + 'clang_warning_flags': [ + # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" + '-Wno-extra-tokens', + ], + }, 'sources': [ 'google_update_idl.idl', '<(SHARED_INTERMEDIATE_DIR)/google_update/google_update_idl.h', diff --git a/remoting/remoting_host_win.gypi b/remoting/remoting_host_win.gypi index 78952d5..9f52deb 100644 --- a/remoting/remoting_host_win.gypi +++ b/remoting/remoting_host_win.gypi @@ -30,6 +30,12 @@ # GN version: //remoting/host:remoting_lib_idl 'target_name': 'remoting_lib_idl', 'type': 'static_library', + 'variables': { + 'clang_warning_flags': [ + # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" + '-Wno-extra-tokens', + ], + }, 'sources': [ 'host/win/chromoting_lib_idl.templ', '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h', diff --git a/third_party/iaccessible2/iaccessible2.gyp b/third_party/iaccessible2/iaccessible2.gyp index 1646399..9af1c4f 100644 --- a/third_party/iaccessible2/iaccessible2.gyp +++ b/third_party/iaccessible2/iaccessible2.gyp @@ -10,6 +10,12 @@ { 'target_name': 'iaccessible2', 'type': 'static_library', + 'variables': { + 'clang_warning_flags': [ + # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" + '-Wno-extra-tokens', + ], + }, 'sources': [ 'ia2_api_all.idl', '<(midl_out_dir)/ia2_api_all.h', diff --git a/third_party/isimpledom/isimpledom.gyp b/third_party/isimpledom/isimpledom.gyp index 80a0089..9f3fbee 100644 --- a/third_party/isimpledom/isimpledom.gyp +++ b/third_party/isimpledom/isimpledom.gyp @@ -9,6 +9,10 @@ 'type': 'static_library', 'variables': { 'midl_out_dir': '<(SHARED_INTERMEDIATE_DIR)/third_party/isimpledom', + 'clang_warning_flags': [ + # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_" + '-Wno-extra-tokens', + ], }, 'sources': [ 'ISimpleDOMDocument.idl', |