Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium
authorChris Peterson <cpeterson@mozilla.com>
Sat, 14 May 2016 00:54:55 -0700
changeset 367195 0ee18d7a875a77016dfe5f9ac651787bab7a48d9
parent 367194 2572c0758dd4377a832c1e8ed16522dc829634ad
child 367196 5f64adf2773bb89ba6867f60906f390266b6ab4f
push id18164
push userbmo:rail@mozilla.com
push dateSun, 15 May 2016 23:25:19 +0000
reviewersglandium
bugs1272513
milestone49.0a1
Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium
accessible/windows/ia2/moz.build
accessible/windows/msaa/moz.build
accessible/windows/sdn/moz.build
accessible/windows/uia/moz.build
b2g/app/moz.build
browser/app/moz.build
browser/components/about/moz.build
browser/components/build/moz.build
browser/components/dirprovider/moz.build
browser/components/feeds/moz.build
browser/components/shell/moz.build
devtools/server/moz.build
docshell/base/timeline/moz.build
docshell/build/moz.build
dom/activities/moz.build
dom/animation/moz.build
dom/archivereader/moz.build
dom/audiochannel/moz.build
dom/base/test/gtest/moz.build
dom/battery/moz.build
dom/broadcastchannel/moz.build
dom/browser-element/moz.build
dom/canvas/compiledtest/moz.build
dom/cellbroadcast/moz.build
dom/devicestorage/moz.build
dom/encoding/moz.build
dom/filesystem/moz.build
dom/fmradio/ipc/moz.build
dom/fmradio/moz.build
dom/gamepad/moz.build
dom/geolocation/moz.build
dom/icc/moz.build
dom/inputport/moz.build
dom/json/moz.build
dom/jsurl/moz.build
dom/mathml/moz.build
dom/media/android/moz.build
dom/media/gmp-plugin-openh264/moz.build
dom/media/gmp-plugin/moz.build
dom/media/imagecapture/moz.build
dom/messagechannel/moz.build
dom/nfc/moz.build
dom/offline/moz.build
dom/payment/moz.build
dom/permission/moz.build
dom/plugins/base/android/moz.build
dom/power/moz.build
dom/presentation/moz.build
dom/presentation/provider/moz.build
dom/push/moz.build
dom/security/moz.build
dom/smil/moz.build
dom/speakermanager/moz.build
dom/storage/moz.build
dom/system/android/moz.build
dom/system/moz.build
dom/system/qt/moz.build
dom/system/windows/moz.build
dom/telephony/moz.build
dom/time/moz.build
dom/tv/moz.build
dom/voicemail/moz.build
dom/vr/moz.build
dom/workers/test/gtest/moz.build
dom/xml/moz.build
dom/xslt/xml/moz.build
editor/txmgr/moz.build
editor/txtsvc/moz.build
embedding/browser/build/moz.build
embedding/components/appstartup/moz.build
embedding/components/build/moz.build
embedding/components/commandhandler/moz.build
embedding/components/find/moz.build
embedding/components/printingui/ipc/moz.build
embedding/components/printingui/mac/moz.build
embedding/components/printingui/unixshared/moz.build
embedding/components/printingui/win/moz.build
extensions/auth/moz.build
extensions/gio/moz.build
extensions/permissions/moz.build
extensions/pref/autoconfig/src/moz.build
extensions/spellcheck/hunspell/glue/moz.build
extensions/universalchardet/src/base/moz.build
extensions/universalchardet/src/xpcom/moz.build
gfx/ipc/moz.build
gfx/src/moz.build
gfx/thebes/moz.build
gfx/vr/moz.build
gfx/ycbcr/moz.build
hal/moz.build
image/build/moz.build
image/decoders/icon/android/moz.build
image/decoders/icon/gtk/moz.build
image/decoders/icon/moz.build
image/decoders/icon/qt/moz.build
image/decoders/icon/win/moz.build
image/encoders/bmp/moz.build
image/encoders/ico/moz.build
image/encoders/jpeg/moz.build
image/encoders/png/moz.build
intl/build/moz.build
intl/chardet/moz.build
intl/locale/moz.build
intl/locale/unix/moz.build
intl/lwbrk/moz.build
intl/unicharutil/tests/moz.build
ipc/app/moz.build
ipc/app/pie/moz.build
ipc/contentproc/moz.build
ipc/dbus/moz.build
ipc/hal/moz.build
ipc/ipdl/test/cxx/app/moz.build
ipc/ipdl/test/cxx/moz.build
ipc/netd/moz.build
ipc/nfc/moz.build
ipc/ril/moz.build
ipc/unixfd/moz.build
ipc/unixsocket/moz.build
js/ductwork/debugger/moz.build
js/xpconnect/shell/moz.build
js/xpconnect/tests/components/native/moz.build
layout/base/gtest/moz.build
layout/inspector/moz.build
layout/printing/moz.build
layout/style/moz.build
layout/tools/layout-debug/src/moz.build
media/gmp-clearkey/0.1/gtest/moz.build
media/gmp-clearkey/0.1/moz.build
media/libsoundtouch/src/moz.build
media/libstagefright/gtest/moz.build
memory/build/moz.build
memory/fallible/moz.build
memory/mozalloc/moz.build
memory/mozalloc/staticruntime/moz.build
memory/mozjemalloc/moz.build
memory/replace/dmd/moz.build
memory/replace/dummy/moz.build
memory/replace/jemalloc/moz.build
memory/replace/logalloc/moz.build
memory/replace/logalloc/replay/moz.build
memory/replace/replace/moz.build
memory/volatile/moz.build
memory/volatile/tests/moz.build
modules/libjar/moz.build
modules/libjar/zipwriter/moz.build
modules/libmar/verify/moz.build
modules/libpref/moz.build
mozglue/build/moz.build
mozglue/misc/moz.build
netwerk/protocol/app/moz.build
netwerk/protocol/device/moz.build
netwerk/protocol/viewsource/moz.build
netwerk/socket/moz.build
netwerk/streamconv/moz.build
netwerk/system/android/moz.build
netwerk/system/linux/moz.build
netwerk/system/qt/moz.build
parser/xml/moz.build
rdf/build/moz.build
rdf/datasource/moz.build
rdf/tests/rdfcat/moz.build
rdf/tests/rdfpoll/moz.build
rdf/tests/triplescat/moz.build
storage/build/moz.build
toolkit/components/alerts/moz.build
toolkit/components/autocomplete/moz.build
toolkit/components/build/moz.build
toolkit/components/commandlines/moz.build
toolkit/components/ctypes/moz.build
toolkit/components/ctypes/tests/moz.build
toolkit/components/diskspacewatcher/moz.build
toolkit/components/filepicker/moz.build
toolkit/components/finalizationwitness/moz.build
toolkit/components/find/moz.build
toolkit/components/jsdownloads/src/moz.build
toolkit/components/lz4/moz.build
toolkit/components/mediasniffer/moz.build
toolkit/components/osfile/moz.build
toolkit/components/parentalcontrols/moz.build
toolkit/components/perf/moz.build
toolkit/components/reflect/moz.build
toolkit/components/satchel/moz.build
toolkit/components/startup/moz.build
toolkit/components/statusfilter/moz.build
toolkit/components/terminator/moz.build
toolkit/components/typeaheadfind/moz.build
toolkit/system/androidproxy/moz.build
toolkit/system/gnome/moz.build
toolkit/system/unixproxy/moz.build
uriloader/base/moz.build
view/moz.build
widget/android/jni/moz.build
widget/cocoa/moz.build
widget/gtk/moz.build
widget/gtkxtbin/moz.build
widget/qt/moz.build
widget/uikit/moz.build
widget/x11/moz.build
widget/xremoteclient/moz.build
xpcom/base/moz.build
xpcom/build/moz.build
xpcom/components/moz.build
xpcom/ds/moz.build
xpcom/glue/moz.build
xpcom/glue/standalone/moz.build
xpcom/glue/standalone/staticruntime/moz.build
xpcom/glue/staticruntime/moz.build
xpcom/io/moz.build
xpcom/reflect/xptcall/md/unix/moz.build
xpcom/reflect/xptcall/moz.build
xpcom/string/moz.build
xpcom/system/moz.build
xpcom/tests/bug656331_component/moz.build
xpcom/tests/component/moz.build
xpcom/tests/component_no_aslr/moz.build
xpcom/tests/gtest/moz.build
xpcom/tests/moz.build
xpcom/threads/moz.build
xpcom/typelib/xpt/moz.build
xpfe/components/build/moz.build
xpfe/components/windowds/moz.build
--- a/accessible/windows/ia2/moz.build
+++ b/accessible/windows/ia2/moz.build
@@ -42,19 +42,16 @@ LOCAL_INCLUDES += [
     '/accessible/windows',
     '/accessible/windows/msaa',
     '/accessible/xpcom',
     '/accessible/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # 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.
 if CONFIG['CLANG_CL']:
     CXXFLAGS += ['-Wno-extra-tokens']
 
--- a/accessible/windows/msaa/moz.build
+++ b/accessible/windows/msaa/moz.build
@@ -65,11 +65,8 @@ LOCAL_INCLUDES += [
 #
 # which clang-cl complains about.  MSVC doesn't, so turn this warning off.
 if CONFIG['CLANG_CL']:
     CXXFLAGS += ['-Wno-extra-tokens']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/accessible/windows/sdn/moz.build
+++ b/accessible/windows/sdn/moz.build
@@ -15,11 +15,8 @@ LOCAL_INCLUDES += [
     '/accessible/generic',
     '/accessible/html',
     '/accessible/windows/msaa',
     '/accessible/xpcom',
     '/accessible/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/accessible/windows/uia/moz.build
+++ b/accessible/windows/uia/moz.build
@@ -13,11 +13,8 @@ LOCAL_INCLUDES += [
     '/accessible/generic',
     '/accessible/html',
     '/accessible/windows/msaa',
     '/accessible/xpcom',
     '/accessible/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/b2g/app/moz.build
+++ b/b2g/app/moz.build
@@ -66,18 +66,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
 
 DISABLE_STL_WRAPPING = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     OS_LIBS += [
         'version',
     ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 JS_PREFERENCE_PP_FILES += [
     'b2g.js',
 ]
 
 FINAL_TARGET_PP_FILES += [
   'ua-update.json.in',
 ]
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -66,14 +66,11 @@ if CONFIG['OS_ARCH'] == 'WINNT' and not 
 DISABLE_STL_WRAPPING = True
 
 if CONFIG['MOZ_LINKER']:
     OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
     OS_LIBS += CONFIG['REALTIME_LIBS']
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 for icon in ('firefox', 'document', 'newwindow', 'newtab', 'pbmode'):
     DEFINES[icon.upper() + '_ICO'] = '"%s/dist/branding/%s.ico"' % (
         TOPOBJDIR, icon)
--- a/browser/components/about/moz.build
+++ b/browser/components/about/moz.build
@@ -12,11 +12,8 @@ SOURCES += [
     'AboutRedirector.cpp',
 ]
 
 FINAL_LIBRARY = 'browsercomps'
 
 LOCAL_INCLUDES += [
     '../build',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/browser/components/build/moz.build
+++ b/browser/components/build/moz.build
@@ -33,11 +33,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     DELAYLOAD_DLLS += [
         'esent.dll',
     ]
 
 # Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
 # GTK2: Need to link with glib for GNOME shell service
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'gtk2', 'gtk3'):
     OS_LIBS += CONFIG['TK_LIBS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/browser/components/dirprovider/moz.build
+++ b/browser/components/dirprovider/moz.build
@@ -12,11 +12,8 @@ SOURCES += [
     'DirectoryProvider.cpp',
 ]
 
 FINAL_LIBRARY = 'browsercomps'
 
 LOCAL_INCLUDES += [
     '../build'
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/browser/components/feeds/moz.build
+++ b/browser/components/feeds/moz.build
@@ -34,11 +34,8 @@ for var in ('MOZ_APP_NAME', 'MOZ_MACBUND
     DEFINES[var] = CONFIG[var]
 
 LOCAL_INCLUDES += [
     '../build',
 ]
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'RSS Discovery and Preview')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/browser/components/shell/moz.build
+++ b/browser/components/shell/moz.build
@@ -55,11 +55,8 @@ EXTRA_JS_MODULES += [
 
 for var in ('MOZ_APP_NAME', 'MOZ_APP_VERSION'):
     DEFINES[var] = '"%s"' % CONFIG[var]
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
 with Files('**'):
     BUG_COMPONENT = ('Firefox', 'Shell Integration')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/devtools/server/moz.build
+++ b/devtools/server/moz.build
@@ -32,11 +32,8 @@ DevToolsModules(
     'child.js',
     'content-globals.js',
     'content-server.jsm',
     'main.js',
     'primitive.js',
     'service-worker-child.js',
     'worker.js'
 )
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/docshell/base/timeline/moz.build
+++ b/docshell/base/timeline/moz.build
@@ -35,11 +35,8 @@ UNIFIED_SOURCES += [
     'TimelineMarker.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/docshell/base'
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/docshell/build/moz.build
+++ b/docshell/build/moz.build
@@ -22,13 +22,10 @@ LOCAL_INCLUDES += [
 
 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
     LOCAL_INCLUDES += ['/uriloader/exthandler/mac']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 if CONFIG['MOZ_DEVTOOLS'] == 'all':
     DEFINES['MOZ_DEVTOOLS_ALL'] = True
--- a/dom/activities/moz.build
+++ b/dom/activities/moz.build
@@ -33,11 +33,8 @@ EXTRA_JS_MODULES += [
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/animation/moz.build
+++ b/dom/animation/moz.build
@@ -56,11 +56,8 @@ UNIFIED_SOURCES += [
 
 LOCAL_INCLUDES += [
     '/dom/base',
     '/layout/base',
     '/layout/style',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/archivereader/moz.build
+++ b/dom/archivereader/moz.build
@@ -16,18 +16,15 @@ EXPORTS.mozilla.dom.archivereader += [
 UNIFIED_SOURCES += [
     'ArchiveEvent.cpp',
     'ArchiveReader.cpp',
     'ArchiveRequest.cpp',
     'ArchiveZipEvent.cpp',
     'ArchiveZipFile.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 LOCAL_INCLUDES += [
     '../base',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
--- a/dom/audiochannel/moz.build
+++ b/dom/audiochannel/moz.build
@@ -19,11 +19,8 @@ EXPORTS += [
 UNIFIED_SOURCES += [
     'AudioChannelAgent.cpp',
     'AudioChannelService.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/base/test/gtest/moz.build
+++ b/dom/base/test/gtest/moz.build
@@ -10,11 +10,8 @@ UNIFIED_SOURCES += [
 
 LOCAL_INCLUDES += [
     '/dom/base'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/battery/moz.build
+++ b/dom/battery/moz.build
@@ -13,11 +13,8 @@ SOURCES += [
     'BatteryManager.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/broadcastchannel/moz.build
+++ b/dom/broadcastchannel/moz.build
@@ -24,11 +24,8 @@ LOCAL_INCLUDES += [
 ]
 
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/browser-element/moz.build
+++ b/dom/browser-element/moz.build
@@ -50,11 +50,8 @@ LOCAL_INCLUDES += [
 ]
 
 MOCHITEST_MANIFESTS += [
     'mochitest/mochitest-oop.ini',
     'mochitest/mochitest.ini',
     'mochitest/priority/mochitest.ini',
 ]
 MOCHITEST_CHROME_MANIFESTS += ['mochitest/chrome.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/canvas/compiledtest/moz.build
+++ b/dom/canvas/compiledtest/moz.build
@@ -3,14 +3,11 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 GeckoCppUnitTests([
     'TestWebGLElementArrayCache',
 ])
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 LOCAL_INCLUDES += [
     '../',
 ]
--- a/dom/cellbroadcast/moz.build
+++ b/dom/cellbroadcast/moz.build
@@ -31,11 +31,8 @@ EXPORTS.mozilla.dom.cellbroadcast += [
 
 IPDL_SOURCES += [
     'ipc/PCellBroadcast.ipdl',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/devicestorage/moz.build
+++ b/dom/devicestorage/moz.build
@@ -39,11 +39,8 @@ LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/ipc',
 ]
 
 MOCHITEST_MANIFESTS += [
     'test/mochitest.ini',
 ]
 MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/encoding/moz.build
+++ b/dom/encoding/moz.build
@@ -40,11 +40,8 @@ for prefix in prefixes:
     props.script = props2arrays
     props.inputs = [input_file]
 
 MOCHITEST_MANIFESTS += [
     'test/mochitest.ini',
 ]
 MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/filesystem/moz.build
+++ b/dom/filesystem/moz.build
@@ -41,11 +41,8 @@ IPDL_SOURCES += [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/workers',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/fmradio/ipc/moz.build
+++ b/dom/fmradio/ipc/moz.build
@@ -24,11 +24,8 @@ LOCAL_INCLUDES += [
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/fmradio',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/fmradio/moz.build
+++ b/dom/fmradio/moz.build
@@ -27,11 +27,8 @@ IPDL_SOURCES += [
     'ipc/PFMRadioRequest.ipdl',
 ]
 
 LOCAL_INCLUDES += [
     '../base',
     '../system/gonk',
 ]
 include('/ipc/chromium/chromium-config.mozbuild')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/gamepad/moz.build
+++ b/dom/gamepad/moz.build
@@ -49,11 +49,8 @@ FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 CFLAGS += CONFIG['GLIB_CFLAGS']
 CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
 CXXFLAGS += CONFIG['GLIB_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/geolocation/moz.build
+++ b/dom/geolocation/moz.build
@@ -46,11 +46,8 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'go
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     LOCAL_INCLUDES += [
         '/dom/system/mac',
     ]
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     LOCAL_INCLUDES += [
         '/dom/system/windows',
     ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/icc/moz.build
+++ b/dom/icc/moz.build
@@ -50,11 +50,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/system/gonk',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/inputport/moz.build
+++ b/dom/inputport/moz.build
@@ -39,11 +39,8 @@ XPIDL_MODULE = 'dom_inputport'
 
 MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/json/moz.build
+++ b/dom/json/moz.build
@@ -15,11 +15,8 @@ UNIFIED_SOURCES += [
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/jsurl/moz.build
+++ b/dom/jsurl/moz.build
@@ -17,11 +17,8 @@ LOCAL_INCLUDES += [
     "/netwerk/base",
 ]
 
 FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/mathml/moz.build
+++ b/dom/mathml/moz.build
@@ -10,11 +10,8 @@ UNIFIED_SOURCES += [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/media/android/moz.build
+++ b/dom/media/android/moz.build
@@ -20,11 +20,8 @@ UNIFIED_SOURCES += [
 ]
 
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/html',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/media/gmp-plugin-openh264/moz.build
+++ b/dom/media/gmp-plugin-openh264/moz.build
@@ -23,11 +23,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     OS_LIBS += [
         'ole32',
     ]
 
 USE_STATIC_LIBS = True
 NO_VISIBILITY_FLAGS = True
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/media/gmp-plugin/moz.build
+++ b/dom/media/gmp-plugin/moz.build
@@ -25,11 +25,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     OS_LIBS += [
         'ole32',
     ]
 
 USE_STATIC_LIBS = True
 NO_VISIBILITY_FLAGS = True
 # Don't use STL wrappers; this isn't Gecko code
 DISABLE_STL_WRAPPING = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/media/imagecapture/moz.build
+++ b/dom/media/imagecapture/moz.build
@@ -9,11 +9,8 @@ EXPORTS.mozilla.dom += [
 ]
 
 UNIFIED_SOURCES += [
     'CaptureTask.cpp',
     'ImageCapture.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/messagechannel/moz.build
+++ b/dom/messagechannel/moz.build
@@ -32,11 +32,8 @@ LOCAL_INCLUDES += [
     '../base',
     '../events',
     '../workers',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/nfc/moz.build
+++ b/dom/nfc/moz.build
@@ -50,11 +50,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
     ]
     XPCSHELL_TESTS_MANIFESTS += [
         'tests/unit/xpcshell.ini'
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/offline/moz.build
+++ b/dom/offline/moz.build
@@ -11,11 +11,8 @@ UNIFIED_SOURCES += [
     'nsDOMOfflineResourceList.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/payment/moz.build
+++ b/dom/payment/moz.build
@@ -32,11 +32,8 @@ FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/dom/base'
 ]
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
 
 MOCHITEST_MANIFESTS += ['tests/mochitest/mochitest.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/permission/moz.build
+++ b/dom/permission/moz.build
@@ -43,12 +43,9 @@ if CONFIG['MOZ_B2G_BT']:
 if CONFIG['MOZ_WEBSMS_BACKEND']:
     MOCHITEST_MANIFESTS += ['tests/mochitest-websms.ini']
 
 if CONFIG['MOZ_TIME_MANAGER']:
     MOCHITEST_MANIFESTS += ['tests/mochitest-time.ini']
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/dom/plugins/base/android/moz.build
+++ b/dom/plugins/base/android/moz.build
@@ -28,11 +28,8 @@ LOCAL_INCLUDES += [
     '/gfx/gl',
     '/widget',
     '/widget/android',
 ]
 
 DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/power/moz.build
+++ b/dom/power/moz.build
@@ -28,11 +28,8 @@ UNIFIED_SOURCES += [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
 BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/presentation/moz.build
+++ b/dom/presentation/moz.build
@@ -67,11 +67,8 @@ IPDL_SOURCES += [
 
 LOCAL_INCLUDES += [
     '../base'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/presentation/provider/moz.build
+++ b/dom/presentation/provider/moz.build
@@ -12,11 +12,8 @@ EXTRA_COMPONENTS += [
 UNIFIED_SOURCES += [
     'DisplayDeviceProvider.cpp',
     'MulticastDNSDeviceProvider.cpp',
     'PresentationDeviceProviderModule.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/push/moz.build
+++ b/dom/push/moz.build
@@ -51,18 +51,15 @@ UNIFIED_SOURCES += [
     'PushSubscriptionOptions.cpp',
     'PushUtil.cpp',
 ]
 
 TEST_DIRS += ['test/xpcshell']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 LOCAL_INCLUDES += [
     '../base',
     '../ipc',
     '../workers',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/dom/security/moz.build
+++ b/dom/security/moz.build
@@ -38,10 +38,10 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/caps',
     '/netwerk/base',
 ]
 
 if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow', '-Wformat-security']
-    CXXFLAGS += ['-Wshadow', '-Wformat-security']
+    CFLAGS += ['-Wformat-security']
+    CXXFLAGS += ['-Wformat-security']
--- a/dom/smil/moz.build
+++ b/dom/smil/moz.build
@@ -65,11 +65,8 @@ UNIFIED_SOURCES += [
 LOCAL_INCLUDES += [
     '/dom/base',
     '/dom/svg',
     '/layout/base',
     '/layout/style',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/speakermanager/moz.build
+++ b/dom/speakermanager/moz.build
@@ -16,11 +16,8 @@ UNIFIED_SOURCES += [
     'SpeakerManager.cpp',
     'SpeakerManagerService.cpp',
     'SpeakerManagerServiceChild.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/storage/moz.build
+++ b/dom/storage/moz.build
@@ -27,11 +27,8 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base',
 ]
 
 if CONFIG['ENABLE_TESTS']:
     DEFINES['DOM_STORAGE_TESTS'] = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/system/android/moz.build
+++ b/dom/system/android/moz.build
@@ -10,11 +10,8 @@ SOURCES += [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/geolocation',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/system/moz.build
+++ b/dom/system/moz.build
@@ -58,11 +58,8 @@ LOCAL_INCLUDES += [
     '/js/xpconnect/loader',
 ]
 
 DEFINES['DLL_PREFIX'] = '"%s"' % CONFIG['DLL_PREFIX']
 DEFINES['DLL_SUFFIX'] = '"%s"' % CONFIG['DLL_SUFFIX']
 
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/system/qt/moz.build
+++ b/dom/system/qt/moz.build
@@ -19,11 +19,8 @@ if CONFIG['MOZ_ENABLE_QT5GEOPOSITION']:
 if CONFIG['MOZ_ENABLE_QT5FEEDBACK']:
     SOURCES += [
         'QtHapticFeedback.cpp',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/system/windows/moz.build
+++ b/dom/system/windows/moz.build
@@ -9,11 +9,8 @@ SOURCES += [
     'WindowsLocationProvider.cpp'
 ]
 
 LOCAL_INCLUDES += [
     '/dom/geolocation'
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/telephony/moz.build
+++ b/dom/telephony/moz.build
@@ -74,11 +74,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
     EXTRA_JS_MODULES += [
         'gonk/DialNumberUtils.jsm',
         'gonk/TelephonyUtils.jsm',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/time/moz.build
+++ b/dom/time/moz.build
@@ -22,11 +22,8 @@ UNIFIED_SOURCES += [
     'TimeChangeObserver.cpp',
     'TimeManager.cpp',
     'TimeService.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/tv/moz.build
+++ b/dom/tv/moz.build
@@ -44,11 +44,8 @@ XPIDL_MODULE = 'dom_tv'
 
 MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/voicemail/moz.build
+++ b/dom/voicemail/moz.build
@@ -46,11 +46,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
 
 LOCAL_INCLUDES += [
     '../base',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/vr/moz.build
+++ b/dom/vr/moz.build
@@ -13,11 +13,8 @@ UNIFIED_SOURCES = [
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/dom/base'
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/workers/test/gtest/moz.build
+++ b/dom/workers/test/gtest/moz.build
@@ -6,11 +6,8 @@
 
 UNIFIED_SOURCES = [
     'TestReadWrite.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/dom/xml/moz.build
+++ b/dom/xml/moz.build
@@ -26,19 +26,16 @@ UNIFIED_SOURCES += [
     'nsXMLElement.cpp',
     'nsXMLFragmentContentSink.cpp',
     'nsXMLPrettyPrinter.cpp',
     'ProcessingInstruction.cpp',
     'XMLDocument.cpp',
     'XMLStylesheetProcessingInstruction.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/caps',
     '/dom/base',
     '/dom/html',
     '/dom/xul',
     '/layout/style',
--- a/dom/xslt/xml/moz.build
+++ b/dom/xslt/xml/moz.build
@@ -4,19 +4,16 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 UNIFIED_SOURCES += [
     'txXMLParser.cpp',
     'txXMLUtils.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 LOCAL_INCLUDES += [
     '../base',
     '../xpath',
     '../xslt',
     '/dom/base',
 ]
 
 FINAL_LIBRARY = 'xul'
--- a/editor/txmgr/moz.build
+++ b/editor/txmgr/moz.build
@@ -23,11 +23,8 @@ UNIFIED_SOURCES += [
     'nsTransactionItem.cpp',
     'nsTransactionList.cpp',
     'nsTransactionManager.cpp',
     'nsTransactionManagerFactory.cpp',
     'nsTransactionStack.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/editor/txtsvc/moz.build
+++ b/editor/txtsvc/moz.build
@@ -19,11 +19,8 @@ EXPORTS += [
 ]
 
 UNIFIED_SOURCES += [
     'nsFilteredContentIterator.cpp',
     'nsTextServicesDocument.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/browser/build/moz.build
+++ b/embedding/browser/build/moz.build
@@ -7,11 +7,8 @@
 SOURCES += [
     'nsWebBrowserModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '..',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/appstartup/moz.build
+++ b/embedding/components/appstartup/moz.build
@@ -8,11 +8,8 @@ EXPORTS += [
     'nsIAppStartupNotifier.h',
 ]
 
 SOURCES += [
     'nsAppStartupNotifier.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/build/moz.build
+++ b/embedding/components/build/moz.build
@@ -31,11 +31,8 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
 
 if CONFIG['MOZ_PDF_PRINTING']:
     DEFINES['PROXY_PRINTING'] = 1
     LOCAL_INCLUDES += [
         '../printingui/unixshared',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/commandhandler/moz.build
+++ b/embedding/components/commandhandler/moz.build
@@ -19,11 +19,8 @@ UNIFIED_SOURCES += [
     'nsBaseCommandController.cpp',
     'nsCommandGroup.cpp',
     'nsCommandManager.cpp',
     'nsCommandParams.cpp',
     'nsControllerCommandTable.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/find/moz.build
+++ b/embedding/components/find/moz.build
@@ -12,11 +12,8 @@ XPIDL_SOURCES += [
 XPIDL_MODULE = 'find'
 
 UNIFIED_SOURCES += [
     'nsFind.cpp',
     'nsWebBrowserFind.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/printingui/ipc/moz.build
+++ b/embedding/components/printingui/ipc/moz.build
@@ -28,11 +28,8 @@ IPDL_SOURCES += [
     'PPrintingTypes.ipdlh',
     'PPrintProgressDialog.ipdl',
     'PPrintSettingsDialog.ipdl',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/printingui/mac/moz.build
+++ b/embedding/components/printingui/mac/moz.build
@@ -9,11 +9,8 @@ UNIFIED_SOURCES += [
     'nsPrintProgressParams.cpp',
 ]
 
 SOURCES += [
     'nsPrintingPromptServiceX.mm',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/printingui/unixshared/moz.build
+++ b/embedding/components/printingui/unixshared/moz.build
@@ -6,11 +6,8 @@
 
 UNIFIED_SOURCES += [
     'nsPrintingPromptService.cpp',
     'nsPrintProgress.cpp',
     'nsPrintProgressParams.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/embedding/components/printingui/win/moz.build
+++ b/embedding/components/printingui/win/moz.build
@@ -11,11 +11,8 @@ UNIFIED_SOURCES += [
     'nsPrintProgressParams.cpp',
 ]
 
 EXPORTS += [
     'nsPrintDialogUtil.h',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/extensions/auth/moz.build
+++ b/extensions/auth/moz.build
@@ -20,11 +20,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     ]
     DEFINES['USE_SSPI'] = True
 else:
     UNIFIED_SOURCES += [
         'nsAuthSambaNTLM.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/extensions/gio/moz.build
+++ b/extensions/gio/moz.build
@@ -6,11 +6,8 @@
 
 SOURCES += [
     'nsGIOProtocolHandler.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_GIO_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/extensions/permissions/moz.build
+++ b/extensions/permissions/moz.build
@@ -5,11 +5,8 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 UNIFIED_SOURCES += [
     'nsContentBlocker.cpp',
     'nsModuleFactory.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/extensions/pref/autoconfig/src/moz.build
+++ b/extensions/pref/autoconfig/src/moz.build
@@ -8,14 +8,11 @@ UNIFIED_SOURCES += [
     'nsAutoConfig.cpp',
     'nsConfigFactory.cpp',
     'nsJSConfigTriggers.cpp',
     'nsReadConfig.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_TARGET_FILES.defaults.autoconfig += [
     'prefcalls.js',
 ]
--- a/extensions/spellcheck/hunspell/glue/moz.build
+++ b/extensions/spellcheck/hunspell/glue/moz.build
@@ -28,14 +28,11 @@ IPDL_SOURCES = [
     'PRemoteSpellcheckEngine.ipdl',
 ]
 
 EXPORTS.mozilla += [
      'RemoteSpellCheckEngineChild.h',
      'RemoteSpellCheckEngineParent.h',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # This variable is referenced in configure.in.  Make sure to change that file
 # too if you need to change this variable.
 DEFINES['HUNSPELL_STATIC'] = True
--- a/extensions/universalchardet/src/base/moz.build
+++ b/extensions/universalchardet/src/base/moz.build
@@ -15,11 +15,8 @@ UNIFIED_SOURCES += [
     'nsMBCSGroupProber.cpp',
     'nsMBCSSM.cpp',
     'nsSJISProber.cpp',
     'nsUniversalDetector.cpp',
     'nsUTF8Prober.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/extensions/universalchardet/src/xpcom/moz.build
+++ b/extensions/universalchardet/src/xpcom/moz.build
@@ -9,11 +9,8 @@ UNIFIED_SOURCES += [
     'nsUniversalCharDetModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../base',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/gfx/ipc/moz.build
+++ b/gfx/ipc/moz.build
@@ -33,11 +33,8 @@ IPDL_SOURCES = [
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/gfx/src/moz.build
+++ b/gfx/src/moz.build
@@ -89,11 +89,8 @@ FINAL_LIBRARY = 'xul'
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
     CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/gfx/thebes/moz.build
+++ b/gfx/thebes/moz.build
@@ -251,19 +251,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
 if CONFIG['ENABLE_INTL_API']:
     CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
     CFLAGS += CONFIG['MOZ_ICU_CFLAGS']
     LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
     USE_LIBS += [
         'icu',
     ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 GENERATED_FILES = [
     'DeprecatedPremultiplyTables.h',
 ]
 GENERATED_FILES['DeprecatedPremultiplyTables.h'].script = 'genTables.py:generate'
--- a/gfx/vr/moz.build
+++ b/gfx/vr/moz.build
@@ -50,16 +50,13 @@ CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CFLAGS += CONFIG['TK_CFLAGS']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # This is intended as a temporary hack to enable VS2015 builds.
 if CONFIG['_MSC_VER']:
     # ovr_capi_dynamic.h '<unnamed-tag>': Alignment specifier is less than
     # actual alignment (8), and will be ignored
     CXXFLAGS += ['-wd4359']
--- a/gfx/ycbcr/moz.build
+++ b/gfx/ycbcr/moz.build
@@ -59,11 +59,8 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
     SOURCES += [
         'yuv_row_arm.s',
     ]
     SOURCES += [
         'yuv_convert_arm.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/hal/moz.build
+++ b/hal/moz.build
@@ -181,11 +181,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     LOCAL_INCLUDES += ['%' + '%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']]
 
 CFLAGS += CONFIG['GLIB_CFLAGS']
 CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
 CXXFLAGS += CONFIG['GLIB_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/build/moz.build
+++ b/image/build/moz.build
@@ -15,11 +15,8 @@ SOURCES += [
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/image',
     '/image/encoders/bmp',
     '/image/encoders/ico',
     '/image/encoders/jpeg',
     '/image/encoders/png',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/decoders/icon/android/moz.build
+++ b/image/decoders/icon/android/moz.build
@@ -6,11 +6,8 @@
 
 SOURCES += [
     'nsIconChannel.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/decoders/icon/gtk/moz.build
+++ b/image/decoders/icon/gtk/moz.build
@@ -9,11 +9,8 @@ SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_ENABLE_GNOMEUI']:
     CXXFLAGS += CONFIG['MOZ_GNOMEUI_CFLAGS']
 else:
     CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/decoders/icon/moz.build
+++ b/image/decoders/icon/moz.build
@@ -28,11 +28,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     platform = 'mac'
 
 if CONFIG['OS_TARGET'] == 'Android':
     platform = 'android'
 
 if platform:
     LOCAL_INCLUDES += [platform]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/decoders/icon/qt/moz.build
+++ b/image/decoders/icon/qt/moz.build
@@ -20,11 +20,8 @@ EXTRA_COMPONENTS += [
 
 EXTRA_PP_COMPONENTS += [
     'gtkqticonsconverter.js',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/decoders/icon/win/moz.build
+++ b/image/decoders/icon/win/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsIconChannel.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/encoders/bmp/moz.build
+++ b/image/encoders/bmp/moz.build
@@ -8,11 +8,8 @@ SOURCES += [
     'nsBMPEncoder.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/image',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/encoders/ico/moz.build
+++ b/image/encoders/ico/moz.build
@@ -11,11 +11,8 @@ SOURCES += [
 # Decoders need RasterImage.h
 LOCAL_INCLUDES += [
     '/image',
     '/image/encoders/bmp',
     '/image/encoders/png',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/encoders/jpeg/moz.build
+++ b/image/encoders/jpeg/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsJPEGEncoder.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/image/encoders/png/moz.build
+++ b/image/encoders/png/moz.build
@@ -8,11 +8,8 @@ SOURCES += [
     'nsPNGEncoder.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '/image',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/intl/build/moz.build
+++ b/intl/build/moz.build
@@ -13,11 +13,8 @@ CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
 LOCAL_INCLUDES += CONFIG['MOZ_ICU_INCLUDES']
 LOCAL_INCLUDES += [
     '../locale',
     '../lwbrk',
     '../strres',
     '../uconv',
     '../unicharutil',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/intl/chardet/moz.build
+++ b/intl/chardet/moz.build
@@ -12,11 +12,8 @@ EXPORTS += [
 ]
 
 UNIFIED_SOURCES += [
     'nsChardetModule.cpp',
     'nsCyrillicDetector.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/intl/locale/moz.build
+++ b/intl/locale/moz.build
@@ -64,11 +64,8 @@ GENERATED_FILES += [
     'langGroups.properties.h',
 ]
 langgroups = GENERATED_FILES['langGroups.properties.h']
 langgroups.script = 'props2arrays.py'
 langgroups.inputs = ['langGroups.properties']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
     CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/intl/locale/unix/moz.build
+++ b/intl/locale/unix/moz.build
@@ -27,17 +27,13 @@ GENERATED_FILES = [
 unixcharset = GENERATED_FILES['unixcharset.properties.h']
 unixcharset.script = '../props2arrays.py'
 unixcharset.inputs = ['unixcharset.properties']
 
 LOCAL_INCLUDES += [
     '..',
 ]
 
-
 # CODESET is not automatically defined on some older versions of Redhat.
 # Define _XOPEN_SOURCE so CODESET will get defined and thus allow
 # nl_langinfo(CODESET) to compile on these systems.
 if CONFIG['OS_ARCH'] == 'Linux':
     DEFINES['_XOPEN_SOURCE'] = 500
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/intl/lwbrk/moz.build
+++ b/intl/lwbrk/moz.build
@@ -41,11 +41,8 @@ else:
     SOURCES += [
         'nsRuleBreaker.cpp',
     ]
     SOURCES += [
         'rulebrk.c',
     ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/intl/unicharutil/tests/moz.build
+++ b/intl/unicharutil/tests/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'NormalizationTest.cpp',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/app/moz.build
+++ b/ipc/app/moz.build
@@ -121,11 +121,8 @@ LDFLAGS += CONFIG['MOZ_ALLOW_HEAP_EXECUT
 if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
     LDFLAGS += ['/HEAP:0x40000']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     OS_LIBS += [
         'binder',
         'utils',
     ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/app/pie/moz.build
+++ b/ipc/app/pie/moz.build
@@ -23,11 +23,8 @@ if CONFIG['MOZ_SANDBOX']:
 
     # gcc lto likes to put the top level asm in syscall.cc in a different partition
     # from the function using it which breaks the build.  Work around that by
     # forcing there to be only one partition.
     if '-flto' in CONFIG['OS_CXXFLAGS'] and not CONFIG['CLANG_CXX']:
 	LDFLAGS += ['--param lto-partitions=1']
 
 LDFLAGS += ['-pie']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/contentproc/moz.build
+++ b/ipc/contentproc/moz.build
@@ -15,17 +15,13 @@ SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += [
         '/toolkit/xre',
         '/xpcom/base',
     ]
 
-
 if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
     LOCAL_INCLUDES += [
         '/security/sandbox/chromium',
         '/security/sandbox/chromium-shim',
     ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/dbus/moz.build
+++ b/ipc/dbus/moz.build
@@ -26,11 +26,8 @@ include('/ipc/chromium/chromium-config.m
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_ENABLE_DBUS']:
     CFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
     CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
     CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS']
     CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/hal/moz.build
+++ b/ipc/hal/moz.build
@@ -20,11 +20,8 @@ UNIFIED_SOURCES += [
     'DaemonSocketConsumer.cpp',
     'DaemonSocketPDU.cpp',
     'DaemonSocketPDUHelpers.cpp'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/ipdl/test/cxx/app/moz.build
+++ b/ipc/ipdl/test/cxx/app/moz.build
@@ -13,11 +13,8 @@ include('/ipc/chromium/chromium-config.m
 
 LOCAL_INCLUDES += [
     '/toolkit/xre',
     '/xpcom/base',
 ]
 
 if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/ipdl/test/cxx/moz.build
+++ b/ipc/ipdl/test/cxx/moz.build
@@ -126,11 +126,8 @@ IPDL_SOURCES += [
     'PTestSyncWakeup.ipdl',
     'PTestUrgency.ipdl',
     'PTestUrgentHangs.ipdl',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/netd/moz.build
+++ b/ipc/netd/moz.build
@@ -10,11 +10,8 @@ EXPORTS.mozilla.ipc += [
 
 SOURCES += [
     'Netd.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/nfc/moz.build
+++ b/ipc/nfc/moz.build
@@ -9,11 +9,8 @@ if CONFIG['MOZ_NFC']:
     ]
     SOURCES += [
         'NfcConnector.cpp',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/ril/moz.build
+++ b/ipc/ril/moz.build
@@ -15,11 +15,8 @@ SOURCES += [
     'RilConnector.cpp',
     'RilSocket.cpp',
     'RilSocketConsumer.cpp'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/unixfd/moz.build
+++ b/ipc/unixfd/moz.build
@@ -14,11 +14,8 @@ SOURCES += [
     'UnixFdWatcher.cpp',
     'UnixFileWatcher.cpp',
     'UnixSocketWatcher.cpp'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/ipc/unixsocket/moz.build
+++ b/ipc/unixsocket/moz.build
@@ -24,11 +24,8 @@ SOURCES += [
     'StreamSocket.cpp',
     'StreamSocketConsumer.cpp',
     'UnixSocketConnector.cpp'
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/js/ductwork/debugger/moz.build
+++ b/js/ductwork/debugger/moz.build
@@ -16,11 +16,8 @@ SOURCES += [
     'JSDebugger.cpp',
 ]
 
 EXTRA_JS_MODULES += [
     'jsdebugger.jsm',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/js/xpconnect/shell/moz.build
+++ b/js/xpconnect/shell/moz.build
@@ -32,11 +32,8 @@ if CONFIG['_MSC_VER']:
     WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     RCINCLUDE = 'xpcshell.rc'
 
 CFLAGS += CONFIG['TK_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 OS_LIBS += CONFIG['TK_LIBS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/js/xpconnect/tests/components/native/moz.build
+++ b/js/xpconnect/tests/components/native/moz.build
@@ -12,11 +12,8 @@ EXTRA_COMPONENTS += [
 UNIFIED_SOURCES += [
     'xpctest_attributes.cpp',
     'xpctest_module.cpp',
     'xpctest_params.cpp',
     'xpctest_returncode.cpp',
 ]
 
 XPCOMBinaryComponent('xpctest')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/layout/base/gtest/moz.build
+++ b/layout/base/gtest/moz.build
@@ -17,16 +17,13 @@ if CONFIG['CLANG_CXX']:
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/docshell/base',
     '/layout/base',
     '/layout/style',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # Workaround bug 1142396. Suppress the warning from gmock library for clang.
 if CONFIG['CLANG_CXX']:
     CXXFLAGS += ['-Wno-null-dereference']
 
 FINAL_LIBRARY = 'xul-gtest'
--- a/layout/inspector/moz.build
+++ b/layout/inspector/moz.build
@@ -36,17 +36,14 @@ UNIFIED_SOURCES += [
     'nsFontFaceList.cpp',
 ]
 
 if CONFIG['MOZ_XUL']:
     UNIFIED_SOURCES += [
         'inDOMView.cpp',
     ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '../style',
     '/dom/base',
     '/dom/xbl',
 ]
--- a/layout/printing/moz.build
+++ b/layout/printing/moz.build
@@ -34,10 +34,8 @@ IPDL_SOURCES = [
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '../base',
     '/dom/base',
 ]
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/layout/style/moz.build
+++ b/layout/style/moz.build
@@ -243,12 +243,8 @@ RESOURCE_FILES += [
 
 GENERATED_FILES += [
     'nsCSSPropsGenerated.inc',
     'nsStyleStructList.h',
 ]
 
 style_struct_list = GENERATED_FILES['nsStyleStructList.h']
 style_struct_list.script = 'generate-stylestructlist.py'
-
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
-    CXXFLAGS += ['-Wshadow']
--- a/layout/tools/layout-debug/src/moz.build
+++ b/layout/tools/layout-debug/src/moz.build
@@ -18,11 +18,8 @@ EXPORTS += [
 UNIFIED_SOURCES += [
     'nsDebugFactory.cpp',
     'nsLayoutDebugCLH.cpp',
     'nsLayoutDebuggingTools.cpp',
     'nsRegressionTester.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/media/gmp-clearkey/0.1/gtest/moz.build
+++ b/media/gmp-clearkey/0.1/gtest/moz.build
@@ -8,11 +8,8 @@ UNIFIED_SOURCES += [
     'TestClearKeyUtils.cpp',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
 
 LOCAL_INCLUDES += [
     '..',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/media/gmp-clearkey/0.1/moz.build
+++ b/media/gmp-clearkey/0.1/moz.build
@@ -54,19 +54,16 @@ LOCAL_INCLUDES += [
     '/dom/media/gmp',
 ]
 
 USE_STATIC_LIBS = True
 
 DISABLE_STL_WRAPPING = True
 DEFINES['MOZ_NO_MOZALLOC'] = True
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # Suppress warnings in third-party code.
 if CONFIG['GNU_CXX']:
     CFLAGS += [
         '-Wno-missing-braces',
         '-Wno-pointer-to-int-cast',
         '-Wno-sign-compare',
         '-include', 'stdio.h',      # for sprintf() prototype
         '-include', 'unistd.h',     # for getpid() prototype
--- a/media/libsoundtouch/src/moz.build
+++ b/media/libsoundtouch/src/moz.build
@@ -40,15 +40,12 @@ if CONFIG['OS_ARCH'] != 'WINNT':
     CXXFLAGS += ['-include', SRCDIR + '/soundtouch_perms.h']
 else:
     # Windows need alloca renamed to _alloca
     DEFINES['alloca'] = '_alloca'
 
 # We allow warnings for third-party code that can be updated from upstream.
 ALLOW_COMPILER_WARNINGS = True
 
-if CONFIG['CLANG_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'lgpllibs'
 
 # Use abort() instead of exception in SoundTouch.
 DEFINES['ST_NO_EXCEPTION_HANDLING'] = 1
--- a/media/libstagefright/gtest/moz.build
+++ b/media/libstagefright/gtest/moz.build
@@ -30,11 +30,8 @@ if CONFIG['MOZ_RUST']:
     TEST_HARNESS_FILES.gtest += [
         '../../../dom/media/test/street.mp4',
     ]
     LOCAL_INCLUDES += [
         '../binding/include',
     ]
 
 FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -57,11 +57,8 @@ if CONFIG['MOZ_GLUE_IN_PROGRAM']:
 # Keep jemalloc separated when mozglue is statically linked
 if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
                              CONFIG['MOZ_SYSTEM_JEMALLOC']):
     FINAL_LIBRARY = 'mozglue'
 
 if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
     # The zone allocator for OSX needs some jemalloc internal functions
     LOCAL_INCLUDES += ['/memory/jemalloc/src/include']
-
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
--- a/memory/fallible/moz.build
+++ b/memory/fallible/moz.build
@@ -28,11 +28,8 @@ if CONFIG['_MSC_VER']:
     CXXFLAGS += [
         '-Zl',
     ]
 
     if CONFIG['_MSC_VER'] >= '1900':
         # This further prevents the CRT name from getting into the .obj file,
         # by avoiding pulling in a bunch of string code that uses the CRT.
         DEFINES['mozilla_Char16_h'] = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -44,11 +44,8 @@ if CONFIG['_MSC_VER']:
     DIRS += ['staticruntime']
 
 LOCAL_INCLUDES += [
     '!/xpcom',
     '/memory/build',
 ]
 
 DIST_INSTALL = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/mozalloc/staticruntime/moz.build
+++ b/memory/mozalloc/staticruntime/moz.build
@@ -23,11 +23,8 @@ LOCAL_INCLUDES += ['!/xpcom']
 
 DISABLE_STL_WRAPPING = True
 
 DEFINES['IMPL_MFBT'] = True
 
 USE_STATIC_LIBS = True
 
 Library('mozalloc_staticruntime')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/mozjemalloc/moz.build
+++ b/memory/mozjemalloc/moz.build
@@ -38,15 +38,12 @@ if CONFIG['OS_TARGET'] == 'Linux':
 if CONFIG['MOZ_NUWA_PROCESS']:
     DEFINES['pthread_mutex_lock'] = '__real_pthread_mutex_lock';
 
 LOCAL_INCLUDES += [
     '/memory/build',
 ]
 
 if CONFIG['GNU_CC']:
-    CFLAGS += [
-        '-Wshadow',
-        '-Wno-unused',  # too many annoying fatal warnings from mfbt/ headers
-    ]
+    CFLAGS += ['-Wno-unused'] # too many annoying warnings from mfbt/ headers
 
 if CONFIG['_MSC_VER']:
     CFLAGS += ['-wd4273'] # inconsistent dll linkage (bug 558163)
--- a/memory/replace/dmd/moz.build
+++ b/memory/replace/dmd/moz.build
@@ -32,11 +32,8 @@ if CONFIG['MOZ_OPTIMIZE']:
 DISABLE_STL_WRAPPING = True
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     OS_LIBS += [
         'dbghelp',
     ]
 
 TEST_DIRS += ['test']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/replace/dummy/moz.build
+++ b/memory/replace/dummy/moz.build
@@ -7,11 +7,8 @@ DIST_INSTALL = False
 
 SOURCES += [
     'dummy_replace_malloc.c',
 ]
 
 SharedLibrary('dummy_replace_malloc')
 
 DISABLE_STL_WRAPPING = True
-
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
--- a/memory/replace/jemalloc/moz.build
+++ b/memory/replace/jemalloc/moz.build
@@ -28,11 +28,8 @@ DEFINES['MOZ_REPLACE_JEMALLOC'] = True
 
 LOCAL_INCLUDES += ['!../../jemalloc/src/include']
 if CONFIG['_MSC_VER']:
     LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat']
     if not CONFIG['HAVE_INTTYPES_H']:
         LOCAL_INCLUDES += ['/memory/jemalloc/src/include/msvc_compat/C99']
 
 DISABLE_STL_WRAPPING = True
-
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
--- a/memory/replace/logalloc/moz.build
+++ b/memory/replace/logalloc/moz.build
@@ -34,11 +34,8 @@ include('/ipc/chromium/chromium-config.m
 if CONFIG['OS_TARGET'] == 'Android':
     USE_LIBS += [
         'mozglue',
     ]
 
 DIRS += [
     'replay',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/replace/logalloc/replay/moz.build
+++ b/memory/replace/logalloc/replay/moz.build
@@ -16,11 +16,8 @@ LOCAL_INCLUDES += [
 ]
 
 # Link replace-malloc and the default allocator.
 USE_LIBS += [
     'memory',
 ]
 
 DISABLE_STL_WRAPPING = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/replace/replace/moz.build
+++ b/memory/replace/replace/moz.build
@@ -6,11 +6,8 @@
 
 SharedLibrary('replace_malloc')
 
 SOURCES += [
     'ReplaceMalloc.cpp',
 ]
 
 DISABLE_STL_WRAPPING = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/volatile/moz.build
+++ b/memory/volatile/moz.build
@@ -24,11 +24,8 @@ elif CONFIG['OS_TARGET'] == 'WINNT':
 else:
     UNIFIED_SOURCES += [
         'VolatileBufferFallback.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 TEST_DIRS += ['tests']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/memory/volatile/tests/moz.build
+++ b/memory/volatile/tests/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 UNIFIED_SOURCES = [
     'TestVolatileBuffer.cpp',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/modules/libjar/moz.build
+++ b/modules/libjar/moz.build
@@ -40,11 +40,8 @@ SOURCES += [
     'nsJARFactory.cpp',
     'nsJARInputStream.cpp',
     'nsZipArchive.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/modules/libjar/zipwriter/moz.build
+++ b/modules/libjar/zipwriter/moz.build
@@ -17,11 +17,8 @@ UNIFIED_SOURCES += [
     'nsZipDataStream.cpp',
     'nsZipHeader.cpp',
     'nsZipWriter.cpp',
     'StreamFunctions.cpp',
     'ZipWriterModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/modules/libmar/verify/moz.build
+++ b/modules/libmar/verify/moz.build
@@ -24,11 +24,8 @@ elif CONFIG['OS_ARCH'] == 'Darwin':
     ]
 else:
     DEFINES['MAR_NSS'] = True
     LOCAL_INCLUDES += ['../sign']
 
 LOCAL_INCLUDES += [
     '../src',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/modules/libpref/moz.build
+++ b/modules/libpref/moz.build
@@ -38,14 +38,11 @@ SOURCES += [
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
 DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_TARGET_PP_FILES += [
     'greprefs.js',
 ]
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -109,11 +109,8 @@ if CONFIG['OS_TARGET'] == 'Darwin':
     # might be possible to find a way to avoid all such symbol resolutions,
     # it's currently not possible because at the very least there's a call
     # to pthread_self from tsd_init_check_recursion, which is necessary
     # because somehow clang doesn't want to accept the __thread keyword
     # for TLS.
     LDFLAGS += ['-Wl,-bind_at_load']
 
 DIST_INSTALL = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/mozglue/misc/moz.build
+++ b/mozglue/misc/moz.build
@@ -38,11 +38,8 @@ elif CONFIG['COMPILE_ENVIRONMENT']:
 # the conditions for GeckoStackWalk to work correctly.
 # We exclude this file from other build configurations so that if somebody adds a
 # new usage of NS_StackWalk it will cause a link error, which is better than having
 # GeckoStackWalk silently return garbage at runtime.
 if CONFIG['MOZ_STACKWALKING']:
     SOURCES += [
         'StackWalk.cpp',
     ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/netwerk/protocol/app/moz.build
+++ b/netwerk/protocol/app/moz.build
@@ -3,18 +3,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'AppProtocolHandler.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/caps',
     '/modules/libjar',
     '/netwerk/base',
 ]
-
--- a/netwerk/protocol/device/moz.build
+++ b/netwerk/protocol/device/moz.build
@@ -13,18 +13,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
         'CameraStreamImpl.cpp',
     ]
 
 UNIFIED_SOURCES += [
     'nsDeviceChannel.cpp',
     'nsDeviceProtocolHandler.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/netwerk/base/',
 ]
--- a/netwerk/protocol/viewsource/moz.build
+++ b/netwerk/protocol/viewsource/moz.build
@@ -10,16 +10,12 @@ XPIDL_SOURCES += [
 
 XPIDL_MODULE = 'necko_viewsource'
 
 UNIFIED_SOURCES += [
     'nsViewSourceChannel.cpp',
     'nsViewSourceHandler.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
-
--- a/netwerk/socket/moz.build
+++ b/netwerk/socket/moz.build
@@ -16,12 +16,9 @@ XPIDL_MODULE = 'necko_socket'
 
 UNIFIED_SOURCES += [
     'nsSocketProviderService.cpp',
     'nsSOCKSIOLayer.cpp',
     'nsSOCKSSocketProvider.cpp',
     'nsUDPSocketProvider.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
--- a/netwerk/streamconv/moz.build
+++ b/netwerk/streamconv/moz.build
@@ -18,11 +18,8 @@ XPIDL_SOURCES += [
 
 SOURCES += [
     'nsStreamConverterService.cpp',
 ]
 
 XPIDL_MODULE = 'necko_strconv'
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/netwerk/system/android/moz.build
+++ b/netwerk/system/android/moz.build
@@ -7,11 +7,8 @@
 SOURCES += [
     'nsAndroidNetworkLinkService.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/netwerk/system/linux/moz.build
+++ b/netwerk/system/linux/moz.build
@@ -5,11 +5,8 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['OS_ARCH'] == 'Linux':
     SOURCES += [
         'nsNotifyAddrListener_Linux.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/netwerk/system/qt/moz.build
+++ b/netwerk/system/qt/moz.build
@@ -11,11 +11,8 @@ SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/netwerk/base',
 ]
 
 CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/parser/xml/moz.build
+++ b/parser/xml/moz.build
@@ -29,11 +29,8 @@ EXPORTS += [
 
 SOURCES += [
     'nsSAXAttributes.cpp',
     'nsSAXLocator.cpp',
     'nsSAXXMLReader.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/rdf/build/moz.build
+++ b/rdf/build/moz.build
@@ -13,11 +13,8 @@ SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/rdf/base',
     '/rdf/datasource',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/rdf/datasource/moz.build
+++ b/rdf/datasource/moz.build
@@ -15,11 +15,8 @@ UNIFIED_SOURCES += [
 
 FINAL_LIBRARY = 'xul'
 
 # "This is a dependency on rdfutil.h: it'll go away once that becomes
 # a first-class XPCOM interface."
 LOCAL_INCLUDES += [
     '/rdf/base',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/rdf/tests/rdfcat/moz.build
+++ b/rdf/tests/rdfcat/moz.build
@@ -6,11 +6,8 @@
 
 GeckoProgram('rdfcat', linkage='dependent')
 
 SOURCES += [
     'rdfcat.cpp',
 ]
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/rdf/tests/rdfpoll/moz.build
+++ b/rdf/tests/rdfpoll/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 GeckoProgram('rdfpoll', linkage='dependent')
 
 SOURCES += [
     'rdfpoll.cpp',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/rdf/tests/triplescat/moz.build
+++ b/rdf/tests/triplescat/moz.build
@@ -6,11 +6,8 @@
 
 GeckoProgram('triplescat', linkage='dependent')
 
 SOURCES += [
     'triplescat.cpp',
 ]
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/storage/build/moz.build
+++ b/storage/build/moz.build
@@ -7,18 +7,15 @@
 EXPORTS += [
     'mozStorageCID.h',
 ]
 
 SOURCES += [
     'mozStorageModule.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '..',
 ]
 
 CXXFLAGS += CONFIG['SQLITE_CFLAGS']
--- a/toolkit/components/alerts/moz.build
+++ b/toolkit/components/alerts/moz.build
@@ -31,11 +31,8 @@ UNIFIED_SOURCES += [
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 JAR_MANIFESTS += ['jar.mn']
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Notifications and Alerts')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/autocomplete/moz.build
+++ b/toolkit/components/autocomplete/moz.build
@@ -21,11 +21,8 @@ UNIFIED_SOURCES += [
     'nsAutoCompleteController.cpp',
     'nsAutoCompleteSimpleResult.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Autocomplete')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/build/moz.build
+++ b/toolkit/components/build/moz.build
@@ -28,11 +28,8 @@ LOCAL_INCLUDES += [
     '../typeaheadfind',
     '../url-classifier',
 ]
 
 if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']:
     LOCAL_INCLUDES += [
         '../parentalcontrols',
     ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/commandlines/moz.build
+++ b/toolkit/components/commandlines/moz.build
@@ -23,11 +23,8 @@ XPIDL_MODULE = 'commandlines'
 SOURCES += [
     'nsCommandLine.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Startup and Profile System')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/ctypes/moz.build
+++ b/toolkit/components/ctypes/moz.build
@@ -17,11 +17,8 @@ LOCAL_INCLUDES += [
 EXTRA_JS_MODULES += [
     'ctypes.jsm',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 with Files('**'):
     BUG_COMPONENT = ('Core', 'js-ctypes')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/ctypes/tests/moz.build
+++ b/toolkit/components/ctypes/tests/moz.build
@@ -16,15 +16,12 @@ UNIFIED_SOURCES += [
 ]
 
 SharedLibrary('jsctypes-test')
 
 LOCAL_INCLUDES += [
     '/js/src/ctypes',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 if CONFIG['COMPILE_ENVIRONMENT']:
     shared_library = '!%sjsctypes-test%s' % (CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'])
     TEST_HARNESS_FILES.xpcshell.toolkit.components.ctypes.tests.unit += [shared_library]
     TEST_HARNESS_FILES.testing.mochitest.chrome.toolkit.components.ctypes.tests.chrome += [shared_library]
--- a/toolkit/components/diskspacewatcher/moz.build
+++ b/toolkit/components/diskspacewatcher/moz.build
@@ -16,11 +16,8 @@ XPIDL_MODULE = 'diskspacewatcher'
 
 SOURCES = [
     'DiskSpaceWatcher.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/filepicker/moz.build
+++ b/toolkit/components/filepicker/moz.build
@@ -20,11 +20,8 @@ if CONFIG['MOZ_XUL'] and \
             'nsFilePicker.manifest',
         ]
         XPCSHELL_TESTS_MANIFESTS += [
             'test/unit/xpcshell.ini',
         ]
         FINAL_LIBRARY = 'xul'
 
 JAR_MANIFESTS += ['jar.mn']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/finalizationwitness/moz.build
+++ b/toolkit/components/finalizationwitness/moz.build
@@ -18,11 +18,8 @@ EXPORTS.mozilla += [
     'FinalizationWitnessService.h',
 ]
 
 LOCAL_INCLUDES += [
     '/js/xpconnect/loader',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/find/moz.build
+++ b/toolkit/components/find/moz.build
@@ -10,11 +10,8 @@ XPIDL_SOURCES += [
 
 XPIDL_MODULE = 'mozfind'
 
 SOURCES += [
     'nsFindService.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/jsdownloads/src/moz.build
+++ b/toolkit/components/jsdownloads/src/moz.build
@@ -24,11 +24,8 @@ EXTRA_JS_MODULES += [
 
 EXTRA_PP_JS_MODULES += [
     'DownloadIntegration.jsm',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/lz4/moz.build
+++ b/toolkit/components/lz4/moz.build
@@ -11,11 +11,8 @@ EXTRA_JS_MODULES += [
     'lz4_internal.js',
 ]
 
 SOURCES += [
     'lz4.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/mediasniffer/moz.build
+++ b/toolkit/components/mediasniffer/moz.build
@@ -13,14 +13,10 @@ EXPORTS += [
 UNIFIED_SOURCES += [
     'mp3sniff.c',
     'nsMediaSniffer.cpp',
     'nsMediaSnifferModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
-    CXXFLAGS += ['-Wshadow']
-
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Video/Audio')
--- a/toolkit/components/osfile/moz.build
+++ b/toolkit/components/osfile/moz.build
@@ -28,11 +28,8 @@ EXPORTS.mozilla += [
 EXTRA_PP_JS_MODULES += [
     'osfile.jsm',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'OS.File')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/parentalcontrols/moz.build
+++ b/toolkit/components/parentalcontrols/moz.build
@@ -24,11 +24,8 @@ if not CONFIG['MOZ_DISABLE_PARENTAL_CONT
             'nsParentalControlsServiceAndroid.cpp',
         ]
     else:
         SOURCES += [
             'nsParentalControlsServiceDefault.cpp',
         ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/perf/moz.build
+++ b/toolkit/components/perf/moz.build
@@ -14,11 +14,8 @@ EXTRA_JS_MODULES += [
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/js/xpconnect/loader',
 ]
 
 MOCHITEST_CHROME_MANIFESTS += ['chrome.ini']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/reflect/moz.build
+++ b/toolkit/components/reflect/moz.build
@@ -8,11 +8,8 @@ SOURCES += [
     'reflect.cpp',
 ]
 
 EXTRA_JS_MODULES += [
     'reflect.jsm',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/satchel/moz.build
+++ b/toolkit/components/satchel/moz.build
@@ -37,11 +37,8 @@ EXTRA_JS_MODULES += [
     'AutoCompleteE10S.jsm',
     'FormHistory.jsm',
     'nsFormAutoCompleteResult.jsm',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 JAR_MANIFESTS += ['jar.mn']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/startup/moz.build
+++ b/toolkit/components/startup/moz.build
@@ -31,11 +31,8 @@ else:
     UNIFIED_SOURCES += [
         'nsUserInfoUnix.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Startup and Profile System')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/statusfilter/moz.build
+++ b/toolkit/components/statusfilter/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsBrowserStatusFilter.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/terminator/moz.build
+++ b/toolkit/components/terminator/moz.build
@@ -15,11 +15,8 @@ EXPORTS += [
 ]
 
 EXTRA_COMPONENTS += [
     'nsTerminatorTelemetry.js',
     'terminator.manifest',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/components/typeaheadfind/moz.build
+++ b/toolkit/components/typeaheadfind/moz.build
@@ -15,11 +15,8 @@ SOURCES += [
 ]
 
 FINAL_LIBRARY = 'xul'
 
 JAR_MANIFESTS += ['jar.mn']
 
 with Files('**'):
     BUG_COMPONENT = ('Toolkit', 'Find Toolbar')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/system/androidproxy/moz.build
+++ b/toolkit/system/androidproxy/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsAndroidSystemProxySettings.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/system/gnome/moz.build
+++ b/toolkit/system/gnome/moz.build
@@ -30,11 +30,8 @@ LOCAL_INCLUDES += [
 
 CXXFLAGS += CONFIG['MOZ_GCONF_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_GIO_CFLAGS']
 CXXFLAGS += CONFIG['GLIB_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/toolkit/system/unixproxy/moz.build
+++ b/toolkit/system/unixproxy/moz.build
@@ -10,11 +10,8 @@ if CONFIG['MOZ_ENABLE_LIBPROXY']:
         'nsLibProxySettings.cpp',
     ]
 else:
     SOURCES += [
         'nsUnixSystemProxySettings.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/uriloader/base/moz.build
+++ b/uriloader/base/moz.build
@@ -24,11 +24,8 @@ EXPORTS += [
 ]
 
 UNIFIED_SOURCES += [
     'nsDocLoader.cpp',
     'nsURILoader.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/view/moz.build
+++ b/view/moz.build
@@ -10,14 +10,11 @@ EXPORTS += [
 ]
 
 # nsViewManager.cpp cannot be built in unified mode because it uses PL_ARENA_CONST_ALIGN_MASK.
 SOURCES += [
     'nsView.cpp',
     'nsViewManager.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
--- a/widget/android/jni/moz.build
+++ b/widget/android/jni/moz.build
@@ -16,11 +16,8 @@ UNIFIED_SOURCES += [
     'Utils.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '/widget/android',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/widget/cocoa/moz.build
+++ b/widget/cocoa/moz.build
@@ -72,19 +72,16 @@ SOURCES += [
 
 if not CONFIG['RELEASE_BUILD'] or CONFIG['MOZ_DEBUG']:
     SOURCES += [
         'nsSandboxViolationSink.mm',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # XXX: We should fix these warnings.
 ALLOW_COMPILER_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/layout/forms',
     '/layout/generic',
     '/layout/style',
--- a/widget/gtk/moz.build
+++ b/widget/gtk/moz.build
@@ -60,19 +60,16 @@ if CONFIG['NS_PRINTING']:
     ]
 
 if CONFIG['MOZ_X11']:
     UNIFIED_SOURCES += [
         'nsClipboard.cpp',
         'nsDragService.cpp',
     ]
 
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
-
 if CONFIG['ACCESSIBILITY']:
     UNIFIED_SOURCES += [
         'maiRedundantObjectFactory.c',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     UNIFIED_SOURCES += [
         'gtk2drawing.c',
--- a/widget/gtkxtbin/moz.build
+++ b/widget/gtkxtbin/moz.build
@@ -12,11 +12,8 @@ SOURCES += [
     'gtk2xtbin.c',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['_IMPL_GTKXTBIN_API'] = True
 
 CFLAGS += CONFIG['MOZ_GTK2_CFLAGS']
-
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
--- a/widget/qt/moz.build
+++ b/widget/qt/moz.build
@@ -59,11 +59,8 @@ if CONFIG['OS_ARCH'] == 'SunOS' and not 
     # line 29: Error: Multiple declaration for std::tm.
     # So, this gets around the problem.
     DEFINES['_TIME_H'] = 1
 
 CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
 CFLAGS += CONFIG['MOZ_QT_CFLAGS']
 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/widget/uikit/moz.build
+++ b/widget/uikit/moz.build
@@ -12,11 +12,8 @@ SOURCES += [
     'nsWidgetFactory.mm',
     'nsWindow.mm',
 ]
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/widget',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/widget/x11/moz.build
+++ b/widget/x11/moz.build
@@ -6,11 +6,8 @@
 
 SOURCES += [
     'keysym2ucs.c',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
--- a/widget/xremoteclient/moz.build
+++ b/widget/xremoteclient/moz.build
@@ -4,11 +4,8 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 FINAL_LIBRARY = 'xul'
 
 SOURCES += [
     'XRemoteClient.cpp',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/base/moz.build
+++ b/xpcom/base/moz.build
@@ -152,11 +152,8 @@ FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../build',
     '/xpcom/ds',
 ]
 
 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
     CXXFLAGS += CONFIG['TK_CFLAGS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/build/moz.build
+++ b/xpcom/build/moz.build
@@ -64,20 +64,16 @@ if CONFIG['OS_ARCH'] != 'WINNT':
 
 # FileLocation.cpp and Omnijar.cpp cannot be built in unified mode because they
 # use plarena.h.
 SOURCES += [
     'FileLocation.cpp',
     'Omnijar.cpp',
 ]
 
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
-    CXXFLAGS += ['-Wshadow']
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['_IMPL_NS_STRINGAPI'] = True
 DEFINES['OMNIJAR_NAME'] = CONFIG['OMNIJAR_NAME']
 if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
     DEFINES['MOZ_ICU_DATA_ARCHIVE'] = True
--- a/xpcom/components/moz.build
+++ b/xpcom/components/moz.build
@@ -34,19 +34,16 @@ SOURCES += [
     'nsComponentManager.cpp',
 ]
 
 UNIFIED_SOURCES += [
     'ManifestParser.cpp',
     'nsNativeModuleLoader.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '!..',
     '../base',
     '../build',
     '../ds',
     '../reflect/xptinfo',
--- a/xpcom/ds/moz.build
+++ b/xpcom/ds/moz.build
@@ -95,11 +95,8 @@ EXTRA_COMPONENTS += [
     'nsINIProcessor.manifest',
 ]
 
 LOCAL_INCLUDES += [
     '../io',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/glue/moz.build
+++ b/xpcom/glue/moz.build
@@ -115,11 +115,8 @@ if CONFIG['ENABLE_TESTS']:
 USE_LIBS += [
     'fallible',
 ]
 
 # Force to build a static library only
 NO_EXPAND_LIBS = True
 
 DIST_INSTALL = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/glue/standalone/moz.build
+++ b/xpcom/glue/standalone/moz.build
@@ -39,19 +39,16 @@ DEFINES['XPCOM_GLUE'] = True
 LOCAL_INCLUDES += [
     '../../build',
     '../../threads',
 ]
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 DISABLE_STL_WRAPPING = True
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # Include fallible for third party code using the xpcom glue
 USE_LIBS += [
     'fallible',
 ]
 
 # Force to build a static library only
 NO_EXPAND_LIBS = True
 
--- a/xpcom/glue/standalone/staticruntime/moz.build
+++ b/xpcom/glue/standalone/staticruntime/moz.build
@@ -34,19 +34,16 @@ LOCAL_INCLUDES += [
 ]
 
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = True
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 DISABLE_STL_WRAPPING = True
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # Include fallible for third party code using the xpcom glue
 USE_LIBS += [
     'fallible',
 ]
 
 # Force to build a static library only
 NO_EXPAND_LIBS = True
 
--- a/xpcom/glue/staticruntime/moz.build
+++ b/xpcom/glue/staticruntime/moz.build
@@ -32,19 +32,16 @@ LOCAL_INCLUDES += [
 ]
 
 # Statically link to the CRT on Windows
 USE_STATIC_LIBS = True
 
 # Don't use STL wrappers here (i.e. wrapped <new>); they require mozalloc
 DISABLE_STL_WRAPPING = True
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 # Include fallible for third party code using the xpcom glue
 USE_LIBS += [
     'fallible',
 ]
 
 # Force to build a static library only
 NO_EXPAND_LIBS = True
 
--- a/xpcom/io/moz.build
+++ b/xpcom/io/moz.build
@@ -117,20 +117,16 @@ UNIFIED_SOURCES += [
     'SpecialSystemDirectory.cpp',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += [
         'CocoaFileUtils.mm',
     ]
 
-if CONFIG['GNU_CC']:
-    CFLAGS += ['-Wshadow']
-    CXXFLAGS += ['-Wshadow']
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['OS_ARCH'] == 'Linux' and 'lib64' in CONFIG['libdir']:
     DEFINES['HAVE_USR_LIB64_DIR'] = True
 
 LOCAL_INCLUDES += ['!..']
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -320,11 +320,8 @@ if CONFIG['OS_ARCH'] == 'Linux':
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../..',
     '/xpcom/reflect/xptinfo',
 ]
 
 NO_PGO = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/reflect/xptcall/moz.build
+++ b/xpcom/reflect/xptcall/moz.build
@@ -16,11 +16,8 @@ EXPORTS += [
     'xptcstubsdef.inc',
 ]
 
 LOCAL_INCLUDES += [
     '/xpcom/reflect/xptinfo',
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/string/moz.build
+++ b/xpcom/string/moz.build
@@ -52,11 +52,8 @@ UNIFIED_SOURCES += [
 
 # Are we targeting x86 or x86-64?  If so, compile the SSE2 functions for
 # nsUTF8Utils.cpp.
 if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += ['nsUTF8UtilsSSE2.cpp']
     SOURCES['nsUTF8UtilsSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/system/moz.build
+++ b/xpcom/system/moz.build
@@ -19,11 +19,8 @@ XPIDL_SOURCES += [
 ]
 
 if CONFIG['MOZ_CRASHREPORTER']:
     XPIDL_SOURCES += [
         'nsICrashReporter.idl',
     ]
 
 XPIDL_MODULE = 'xpcom_system'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/tests/bug656331_component/moz.build
+++ b/xpcom/tests/bug656331_component/moz.build
@@ -19,11 +19,8 @@ DEFINES['LIBRARY_FILENAME'] = '%s%s%s' %
     CONFIG['DLL_PREFIX'],
     LIBRARY_NAME,
     CONFIG['DLL_SUFFIX']
 )
 
 # Need to link with CoreFoundation on Mac
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     OS_LIBS += CONFIG['TK_LIBS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/tests/component/moz.build
+++ b/xpcom/tests/component/moz.build
@@ -19,11 +19,8 @@ DEFINES['LIBRARY_FILENAME'] = '%s%s%s' %
     CONFIG['DLL_PREFIX'],
     LIBRARY_NAME,
     CONFIG['DLL_SUFFIX']
 )
 
 # Need to link with CoreFoundation on Mac
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     OS_LIBS += CONFIG['TK_LIBS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/tests/component_no_aslr/moz.build
+++ b/xpcom/tests/component_no_aslr/moz.build
@@ -19,11 +19,8 @@ DEFINES['LIBRARY_FILENAME'] = '%s%s%s' %
     CONFIG['DLL_PREFIX'],
     LIBRARY_NAME,
     CONFIG['DLL_SUFFIX']
 )
 
 # Need to link with CoreFoundation on Mac
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     OS_LIBS += CONFIG['TK_LIBS']
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/tests/gtest/moz.build
+++ b/xpcom/tests/gtest/moz.build
@@ -29,11 +29,8 @@ UNIFIED_SOURCES += [
     'TestXPIDLString.cpp',
 ]
 
 LOCAL_INCLUDES += [
     '../../base',
 ]
 
 FINAL_LIBRARY = 'xul-gtest'
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/tests/moz.build
+++ b/xpcom/tests/moz.build
@@ -98,11 +98,8 @@ XPIDL_NO_MANIFEST = True
 
 LOCAL_INCLUDES += [
     '../ds',
 ]
 
 RESOURCE_FILES += [
     'test.properties',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/threads/moz.build
+++ b/xpcom/threads/moz.build
@@ -83,11 +83,8 @@ if CONFIG['MOZ_UPDATE_CHANNEL'] not in (
    not CONFIG['MOZ_DEBUG'] and \
    not CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and \
    not CONFIG['MOZ_TSAN']:
     DEFINES['MOZ_ENABLE_BACKGROUND_HANG_MONITOR'] = 1
 
 FINAL_LIBRARY = 'xul'
 
 include('/ipc/chromium/chromium-config.mozbuild')
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpcom/typelib/xpt/moz.build
+++ b/xpcom/typelib/xpt/moz.build
@@ -33,11 +33,8 @@ if CONFIG['_MSC_VER']:
 # Code with FINAL_LIBRARY = 'xul' shouldn't do this, but the code
 # here doesn't use malloc functions anyways, while not setting
 # MOZ_NO_MOZALLOC makes the code include mozalloc.h, which includes
 # inline operator new definitions that MSVC linker doesn't strip
 # when linking the xpt tests.
 DEFINES['MOZ_NO_MOZALLOC'] = True
 
 DIST_INSTALL = True
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpfe/components/build/moz.build
+++ b/xpfe/components/build/moz.build
@@ -8,11 +8,8 @@ SOURCES += [
     'nsModule.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../directory',
 ]
-
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
--- a/xpfe/components/windowds/moz.build
+++ b/xpfe/components/windowds/moz.build
@@ -9,12 +9,9 @@ XPIDL_SOURCES += [
 ]
 
 XPIDL_MODULE = 'windowds'
 
 SOURCES += [
     'nsWindowDataSource.cpp',
 ]
 
-if CONFIG['GNU_CXX']:
-    CXXFLAGS += ['-Wshadow']
-
 FINAL_LIBRARY = 'xul'