From a928047b89d8a1c2727a7e4889c81fc4e4ca927b Mon Sep 17 00:00:00 2001 From: Peter Kasting Date: Tue, 21 Sep 2021 18:08:10 +0000 Subject: [PATCH] Force -Wno-shadow to avoid variable shadowing warnings. Long term, ideally, these would be fixed and this flag can be removed. For now, this is an expedient way to allow enabling -Wshadow in Chromium. Bug: chromium:794619 Change-Id: Idd3b6eaf61cc6e2a32eecf94d6cc6a41afb5f4eb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64761 Auto-Submit: Peter Kasting Commit-Queue: Kai Ninomiya Reviewed-by: Kai Ninomiya --- src/common/BUILD.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn index afaa18f2d5..b4ae07731d 100644 --- a/src/common/BUILD.gn +++ b/src/common/BUILD.gn @@ -94,6 +94,9 @@ config("dawn_internal") { visibility = [ "../*" ] cflags = [] + if (is_clang) { + cflags += [ "-Wno-shadow" ] + } # Enable more warnings that were found when using Dawn in other projects. # Add them only when building in standalone because we control which clang