Disable warnings failing when using Clang on Windows.

This makes it possible to build WebRTC using Clang on Windows.
Depends on https://codereview.webrtc.org/1524703006/

BUG=webrtc:5360, webrtc:5366
NOTRY=True

Review URL: https://codereview.webrtc.org/1522223002

Cr-Commit-Position: refs/heads/master@{#11058}
diff --git a/DEPS b/DEPS
index 64b8be8..820dbee 100644
--- a/DEPS
+++ b/DEPS
@@ -24,7 +24,7 @@
 deps_os = {
   'win': {
     'src/third_party/winsdk_samples/src':
-      Var('chromium_git') + '/external/webrtc/deps/third_party/winsdk_samples_v71@c0cbedd854cb610a53226d9817416c4ab9a7d1e9', # from svn revision 7951
+      Var('chromium_git') + '/external/webrtc/deps/third_party/winsdk_samples_v71@e71b549167a665d7424d6f1dadfbff4b4aad1589',
   },
 }
 
diff --git a/talk/libjingle_tests.gyp b/talk/libjingle_tests.gyp
index 511f7d5..e7b354b 100755
--- a/talk/libjingle_tests.gyp
+++ b/talk/libjingle_tests.gyp
@@ -128,6 +128,17 @@
             },
           },
         }],
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-unused-function',
+              ],
+            },
+          },
+        },],
         ['OS=="ios"', {
           'sources!': [
             'media/sctp/sctpdataengine_unittest.cc',
@@ -240,6 +251,17 @@
             'GTEST_HAS_TR1_TUPLE=1',
            ],
         }],
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-unused-function',
+              ],
+            },
+          },
+        }],
       ],
     },  # target libjingle_peerconnection_unittest
   ],
diff --git a/third_party/winsdk_samples/winsdk_samples.gyp b/third_party/winsdk_samples/winsdk_samples.gyp
index a9b8598..12bc265 100644
--- a/third_party/winsdk_samples/winsdk_samples.gyp
+++ b/third_party/winsdk_samples/winsdk_samples.gyp
@@ -85,6 +85,32 @@
         '<(baseclasses_dir)/wxutil.cpp',
         '<(baseclasses_dir)/wxutil.h',
       ],
+      'conditions': [
+        ['clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-comment',
+                '-Wno-delete-non-virtual-dtor',
+                '-Wno-ignored-attributes',
+                '-Wno-logical-op-parentheses',
+                '-Wno-non-pod-varargs',
+                '-Wno-microsoft-extra-qualification',
+                '-Wno-missing-braces',
+                '-Wno-overloaded-virtual',
+                '-Wno-parentheses',
+                '-Wno-reorder',
+                '-Wno-string-conversion',
+                '-Wno-tautological-constant-out-of-range-compare',
+                '-Wno-unused-private-field',
+                '-Wno-writable-strings',
+              ],
+            },
+          },
+        },],
+      ],  # conditions.
     },
   ],
 }
diff --git a/webrtc/base/base.gyp b/webrtc/base/base.gyp
index cc7d0c3..37421f7 100644
--- a/webrtc/base/base.gyp
+++ b/webrtc/base/base.gyp
@@ -541,6 +541,17 @@
                 'WEBRTC_EXTERNAL_JSON',
               ],
             }],
+            ['OS=="win" and clang==1', {
+              'msvs_settings': {
+                'VCCLCompilerTool': {
+                  'AdditionalOptions': [
+                    # Disable warnings failing when compiling with Clang on Windows.
+                    # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                    '-Wno-missing-braces',
+                  ],
+                },
+              },
+            }],
           ],
         }],
         ['OS == "android"', {
diff --git a/webrtc/base/base_tests.gyp b/webrtc/base/base_tests.gyp
index b813197..5d73d50 100644
--- a/webrtc/base/base_tests.gyp
+++ b/webrtc/base/base_tests.gyp
@@ -134,6 +134,18 @@
               'win32windowpicker_unittest.cc',
             ],
           }],
+          ['OS=="win" and clang==1', {
+            'msvs_settings': {
+              'VCCLCompilerTool': {
+                'AdditionalOptions': [
+                  # Disable warnings failing when compiling with Clang on Windows.
+                  # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                  '-Wno-missing-braces',
+                  '-Wno-unused-const-variable',
+                ],
+              },
+            },
+          }],
           ['OS=="mac"', {
             'sources': [
               'macutils_unittest.cc',
diff --git a/webrtc/modules/audio_coding/codecs/isac/isac_test.gypi b/webrtc/modules/audio_coding/codecs/isac/isac_test.gypi
index 47944b7..54cedb4 100644
--- a/webrtc/modules/audio_coding/codecs/isac/isac_test.gypi
+++ b/webrtc/modules/audio_coding/codecs/isac/isac_test.gypi
@@ -25,6 +25,19 @@
         './main/test/simpleKenny.c',
         './main/util/utility.c',
       ],
+      'conditions': [
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-format',
+              ],
+            },
+          },
+        }],
+      ],  # conditions.
     },
     # ReleaseTest-API
     {
@@ -63,6 +76,5 @@
         './main/util/utility.c',
       ],
     },
-
   ],
 }
diff --git a/webrtc/modules/audio_device/audio_device.gypi b/webrtc/modules/audio_device/audio_device.gypi
index 4802768..41456a8 100644
--- a/webrtc/modules/audio_device/audio_device.gypi
+++ b/webrtc/modules/audio_device/audio_device.gypi
@@ -194,6 +194,27 @@
                 ],
               },
             }],
+            ['OS=="win" and clang==1', {
+              'msvs_settings': {
+                'VCCLCompilerTool': {
+                  'AdditionalOptions': [
+                    # Disable warnings failing when compiling with Clang on Windows.
+                    # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                    '-Wno-bool-conversion',
+                    '-Wno-delete-non-virtual-dtor',
+                    '-Wno-logical-op-parentheses',
+                    '-Wno-microsoft-extra-qualification',
+                    '-Wno-microsoft-goto',
+                    '-Wno-missing-braces',
+                    '-Wno-parentheses-equality',
+                    '-Wno-reorder',
+                    '-Wno-shift-overflow',
+                    '-Wno-tautological-compare',
+                    '-Wno-unused-private-field',
+                  ],
+                },
+              },
+            }],
           ], # conditions
         }], # include_internal_audio_device==1
       ], # conditions
@@ -205,8 +226,8 @@
       'targets': [
         {
           'target_name': 'audio_device_tests',
-         'type': 'executable',
-         'dependencies': [
+          'type': 'executable',
+          'dependencies': [
             'audio_device',
             'webrtc_utility',
             '<(webrtc_root)/test/test.gyp:test_support_main',
diff --git a/webrtc/modules/video_capture/video_capture.gypi b/webrtc/modules/video_capture/video_capture.gypi
index 3ab9b40..c80f2bf 100644
--- a/webrtc/modules/video_capture/video_capture.gypi
+++ b/webrtc/modules/video_capture/video_capture.gypi
@@ -116,6 +116,23 @@
                 ],
               },
             }],  # win
+            ['OS=="win" and clang==1', {
+              'msvs_settings': {
+                'VCCLCompilerTool': {
+                  'AdditionalOptions': [
+                    # Disable warnings failing when compiling with Clang on Windows.
+                    # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                    '-Wno-comment',
+                    '-Wno-ignored-attributes',
+                    '-Wno-microsoft-extra-qualification',
+                    '-Wno-missing-braces',
+                    '-Wno-overloaded-virtual',
+                    '-Wno-reorder',
+                    '-Wno-writable-strings',
+                  ],
+                },
+              },
+            }],
             ['OS=="ios"', {
               'sources': [
                 'ios/device_info_ios.h',
diff --git a/webrtc/modules/video_render/video_render.gypi b/webrtc/modules/video_render/video_render.gypi
index 5ec32b7..e8cc03a 100644
--- a/webrtc/modules/video_render/video_render.gypi
+++ b/webrtc/modules/video_render/video_render.gypi
@@ -149,6 +149,20 @@
                 '<(directx_sdk_path)/Include',
               ],
             }],
+            ['OS=="win" and clang==1', {
+              'msvs_settings': {
+                'VCCLCompilerTool': {
+                  'AdditionalOptions': [
+                    # Disable warnings failing when compiling with Clang on Windows.
+                    # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                    '-Wno-comment',
+                    '-Wno-reorder',
+                    '-Wno-unused-value',
+                    '-Wno-unused-private-field',
+                  ],
+                },
+              },
+            }],
           ] # conditions
         },
       ],
diff --git a/webrtc/test/test.gyp b/webrtc/test/test.gyp
index 0af17f7..f7a5a42 100644
--- a/webrtc/test/test.gyp
+++ b/webrtc/test/test.gyp
@@ -41,6 +41,22 @@
         'channel_transport/udp_transport_impl.cc',
         'channel_transport/udp_transport_impl.h',
       ],
+      'conditions': [
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-parentheses-equality',
+                '-Wno-reorder',
+                '-Wno-tautological-constant-out-of-range-compare',
+                '-Wno-unused-private-field',
+              ],
+            },
+          },
+        }],
+      ],  # conditions.
     },
     {
       'target_name': 'frame_generator',
diff --git a/webrtc/test/webrtc_test_common.gyp b/webrtc/test/webrtc_test_common.gyp
index 928ef6b..ad2448e 100644
--- a/webrtc/test/webrtc_test_common.gyp
+++ b/webrtc/test/webrtc_test_common.gyp
@@ -115,6 +115,19 @@
             '<(directx_sdk_path)/Include',
           ],
         }],
+        ['OS=="win" and clang==1', {
+          'msvs_settings': {
+            'VCCLCompilerTool': {
+              'AdditionalOptions': [
+                # Disable warnings failing when compiling with Clang on Windows.
+                # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                '-Wno-bool-conversion',
+                '-Wno-comment',
+                '-Wno-delete-non-virtual-dtor',
+              ],
+            },
+          },
+        }],
       ],
       'dependencies': [
         '<(DEPTH)/testing/gtest.gyp:gtest',
diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp
index e35f5f2..44b2ca3 100755
--- a/webrtc/webrtc_examples.gyp
+++ b/webrtc/webrtc_examples.gyp
@@ -103,6 +103,18 @@
                 },
               },
             }],  # OS=="win"
+            ['OS=="win" and clang==1', {
+              'msvs_settings': {
+                'VCCLCompilerTool': {
+                  'AdditionalOptions': [
+                    # Disable warnings failing when compiling with Clang on Windows.
+                    # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
+                    '-Wno-reorder',
+                    '-Wno-unused-function',
+                  ],
+                },
+              },
+            }], # OS=="win" and clang==1
             ['OS=="linux"', {
               'sources': [
                 'examples/peerconnection/client/linux/main.cc',