0

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}
This commit is contained in:
Daniel Cheng
2015-07-10 22:16:19 -07:00
parent 59ef9be12e
commit be8d6f5267
7 changed files with 30 additions and 2 deletions
build
common.gypi
config
compiler
toolchain
google_update
remoting
third_party
iaccessible2
isimpledom

@ -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

@ -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

@ -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" ]
}
}

@ -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',

@ -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',

@ -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',

@ -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',