Bug 1476948 - Suppress clang-cl warnings from the MIDL generated code in accessible/. r?Build draft
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Thu, 19 Jul 2018 23:05:27 +0900
changeset 820418 4c26dab2379b229efaefa9e647347c500ebd02f9
parent 820413 6f431dbd7537a23880c4d53f2c67b3b925688442
push id116817
push userVYV03354@nifty.ne.jp
push dateThu, 19 Jul 2018 14:23:54 +0000
reviewersBuild
bugs1476948
milestone63.0a1
Bug 1476948 - Suppress clang-cl warnings from the MIDL generated code in accessible/. r?Build MozReview-Commit-ID: KttvrkWWRPB
accessible/interfaces/gecko/moz.build
accessible/interfaces/ia2/moz.build
accessible/interfaces/msaa/moz.build
accessible/ipc/win/handler/moz.build
--- a/accessible/interfaces/gecko/moz.build
+++ b/accessible/interfaces/gecko/moz.build
@@ -15,15 +15,16 @@ GENERATED_FILES += [
     'IGeckoCustom.h',
     'IGeckoCustom.tlb',
     'IGeckoCustom_i.c',
     'IGeckoCustom_p.c',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-# The Windows MIDL code generator creates things like:
-#
-#   #endif !_MIDL_USE_GUIDDEF_
-#
-# which clang-cl complains about.  MSVC doesn't, so turn this warning off.
+# Suppress warnings from the MIDL generated code.
 if CONFIG['CC_TYPE'] == 'clang-cl':
-    CFLAGS += ['-Wno-extra-tokens']
+    CFLAGS += [
+        '-Wno-extern-initializer',
+        '-Wno-incompatible-pointer-types',
+        '-Wno-missing-braces',
+        '-Wno-unused-const-variable',
+    ]
--- a/accessible/interfaces/ia2/moz.build
+++ b/accessible/interfaces/ia2/moz.build
@@ -85,15 +85,16 @@ GENERATED_FILES += [
 ]
 
 SOURCES += [
     '!%s' % p for p in GENERATED_FILES if p.endswith('.c')
 ]
 
 RCINCLUDE = 'IA2Marshal.rc'
 
-# The Windows MIDL code generator creates things like:
-#
-#   #endif !_MIDL_USE_GUIDDEF_
-#
-# which clang-cl complains about.  MSVC doesn't, so turn this warning off.
+# Suppress warnings from the MIDL generated code.
 if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += ['-Wno-extra-tokens']
+    CFLAGS += [
+        '-Wno-extern-initializer',
+        '-Wno-incompatible-pointer-types',
+        '-Wno-missing-braces',
+        '-Wno-unused-const-variable',
+    ]
--- a/accessible/interfaces/msaa/moz.build
+++ b/accessible/interfaces/msaa/moz.build
@@ -31,15 +31,16 @@ GENERATED_FILES += [
     'ISimpleDOM.h',
     'ISimpleDOM.tlb',
     'ISimpleDOM_i.c',
     'ISimpleDOM_p.c',
 ]
 
 RCINCLUDE = 'AccessibleMarshal.rc'
 
-# The Windows MIDL code generator creates things like:
-#
-#   #endif !_MIDL_USE_GUIDDEF_
-#
-# which clang-cl complains about.  MSVC doesn't, so turn this warning off.
+# Suppress warnings from the MIDL generated code.
 if CONFIG['CC_TYPE'] == 'clang-cl':
-    CFLAGS += ['-Wno-extra-tokens']
+    CFLAGS += [
+        '-Wno-extern-initializer',
+        '-Wno-incompatible-pointer-types',
+        '-Wno-missing-braces',
+        '-Wno-unused-const-variable',
+    ]
--- a/accessible/ipc/win/handler/moz.build
+++ b/accessible/ipc/win/handler/moz.build
@@ -44,16 +44,25 @@ USE_LIBS += [
 ]
 
 OS_LIBS += [
     'rpcrt4',
 ]
 
 RCINCLUDE = 'AccessibleHandler.rc'
 
+# Suppress warnings from the MIDL generated code.
+if CONFIG['CC_TYPE'] == 'clang-cl':
+    CFLAGS += [
+        '-Wno-extern-initializer',
+        '-Wno-incompatible-pointer-types',
+        '-Wno-missing-braces',
+        '-Wno-unused-const-variable',
+    ]
+
 # Since we are defining our own COM entry points (DllRegisterServer et al),
 # but we still want to be able to delegate some work to the generated code,
 # we add the prefix "Proxy" to all of the generated counterparts.
 DEFINES['ENTRY_PREFIX'] = 'Proxy'
 DEFINES['REGISTER_PROXY_DLL'] = True
 LIBRARY_DEFINES['MOZ_MSCOM_REMARSHAL_NO_HANDLER'] = True
 
 # We want to generate distinct UUIDs on a per-channel basis, so we need