Revert "Enable -Wshadow by default for the "chromium code" config."
This reverts commit 4bc6f71377
.
Reason for revert: [Sheriff] most likely to have caused tree failure just now
Original change's description:
> Enable -Wshadow by default for the "chromium code" config.
>
> Bug: 794619
> Change-Id: Ic125a2da8692ba63479d260d3712ed75d7a7cd9f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3202306
> Auto-Submit: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Owners-Override: Scott Violet <sky@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#940761}
TBR=sky@chromium.org,pkasting@chromium.org,dpranke@google.com,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
Change-Id: I507152afeadaf7c8d66822a30e9d94858aaecb91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 794619
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3275779
Reviewed-by: Kamila Hasanbega <hkamila@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Owners-Override: Liviu Tinta <liviutinta@chromium.org>
Owners-Override: Kamila Hasanbega <hkamila@google.com>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940767}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
13c36089e5
commit
3fadf6d931
base
build/config/compiler
cc
components
content
gpu
mojo/core
net/third_party/quiche
pdf
printing
third_party
blink
common
renderer
nearby
ui
@ -1351,6 +1351,7 @@ component("base") {
|
||||
":base_implementation",
|
||||
":memory_tagging",
|
||||
"//build/config:precompiled_headers",
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wglobal_constructors",
|
||||
]
|
||||
|
||||
@ -3736,7 +3737,10 @@ test("base_unittests") {
|
||||
]
|
||||
}
|
||||
|
||||
configs += [ ":memory_tagging" ]
|
||||
configs += [
|
||||
":memory_tagging",
|
||||
"//build/config/compiler:noshadowing",
|
||||
]
|
||||
}
|
||||
|
||||
action("build_date") {
|
||||
|
@ -1649,10 +1649,7 @@ config("chromium_code") {
|
||||
}
|
||||
}
|
||||
|
||||
configs = [
|
||||
":default_warnings",
|
||||
":noshadowing",
|
||||
]
|
||||
configs = [ ":default_warnings" ]
|
||||
}
|
||||
|
||||
config("no_chromium_code") {
|
||||
|
@ -7,6 +7,7 @@ import("//testing/test.gni")
|
||||
cc_remove_configs = []
|
||||
cc_add_configs = [
|
||||
"//build/config:precompiled_headers",
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
|
@ -10,6 +10,10 @@ static_library("android_system_error_page") {
|
||||
"error_page_populator.h",
|
||||
]
|
||||
|
||||
configs += [
|
||||
"//build/config/compiler:noshadowing",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
|
@ -58,12 +58,6 @@ wayland_protocol_codegen("generated_client_event_receiver_version_tests") {
|
||||
"$target_gen_dir/all_generated_client_event_receiver_version_tests.cc"
|
||||
}
|
||||
|
||||
config("generated_code_warnings") {
|
||||
if (is_clang) {
|
||||
cflags = [ "-Wno-shadow" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("compatibility_test") {
|
||||
testonly = true
|
||||
|
||||
@ -105,6 +99,4 @@ source_set("compatibility_test") {
|
||||
"//third_party/wayland-protocols:vsync_feedback_protocol",
|
||||
"//third_party/wayland-protocols:xdg_shell_protocol",
|
||||
]
|
||||
|
||||
configs += [ ":generated_code_warnings" ]
|
||||
}
|
||||
|
@ -29,6 +29,8 @@ static_library("url_formatter") {
|
||||
"url_formatter.h",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//base:i18n",
|
||||
|
@ -9,7 +9,10 @@ import("//tools/grit/grit_rule.gni")
|
||||
# Applied by targets internal to content.
|
||||
config("content_implementation") {
|
||||
defines = [ "CONTENT_IMPLEMENTATION" ]
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
assert(!is_ios, "Chromium/iOS shouldn't use anything in //content")
|
||||
|
25
gpu/BUILD.gn
25
gpu/BUILD.gn
@ -12,27 +12,42 @@ import("//ui/gl/features.gni")
|
||||
|
||||
config("gpu_implementation") {
|
||||
defines = [ "GPU_IMPLEMENTATION" ]
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
config("gpu_gles2_implementation") {
|
||||
defines = [ "GPU_GLES2_IMPLEMENTATION" ]
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
config("gpu_util_implementation") {
|
||||
defines = [ "GPU_UTIL_IMPLEMENTATION" ]
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
config("raster_implementation") {
|
||||
defines = [ "RASTER_IMPLEMENTATION" ]
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
config("webgpu_implementation") {
|
||||
defines = [ "WEBGPU_IMPLEMENTATION" ]
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
component("gpu") {
|
||||
|
@ -177,6 +177,7 @@ template("core_impl_source_set") {
|
||||
defines += [ "MOJO_CORE_LEGACY_PROTOCOL" ]
|
||||
}
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
if (!is_debug && !optimize_for_size) {
|
||||
configs -= [ "//build/config/compiler:default_optimization" ]
|
||||
configs += [ "//build/config/compiler:optimize_max" ]
|
||||
|
2
net/third_party/quiche/BUILD.gn
vendored
2
net/third_party/quiche/BUILD.gn
vendored
@ -14,8 +14,6 @@ config("quiche_config") {
|
||||
"src/common/platform/default",
|
||||
"src",
|
||||
]
|
||||
|
||||
cflags = [ "-Wno-shadow" ]
|
||||
}
|
||||
|
||||
# Since //net and //net/third_party/quiche have a circular dependency on each
|
||||
|
15
pdf/BUILD.gn
15
pdf/BUILD.gn
@ -21,8 +21,15 @@ buildflag_header("buildflags") {
|
||||
}
|
||||
|
||||
if (enable_pdf) {
|
||||
config("common") {
|
||||
configs = [ "//build/config/compiler:noshadowing" ]
|
||||
}
|
||||
|
||||
config("strict") {
|
||||
configs = [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
configs = [
|
||||
":common",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
}
|
||||
|
||||
config("pdfium_includes") {
|
||||
@ -218,6 +225,8 @@ if (enable_pdf) {
|
||||
"ppapi_migration/ppapi_assert_matching_enums.cc",
|
||||
]
|
||||
|
||||
configs += [ ":common" ]
|
||||
|
||||
deps = [
|
||||
":accessibility",
|
||||
":internal",
|
||||
@ -395,6 +404,8 @@ if (enable_pdf) {
|
||||
"test/test_pdfium_engine.h",
|
||||
]
|
||||
|
||||
configs += [ ":common" ]
|
||||
|
||||
deps = [
|
||||
":internal",
|
||||
":ppapi_migration",
|
||||
@ -457,6 +468,8 @@ if (enable_pdf) {
|
||||
"ui/thumbnail_unittest.cc",
|
||||
]
|
||||
|
||||
configs += [ ":common" ]
|
||||
|
||||
data = [ "test/data/" ]
|
||||
|
||||
deps = [
|
||||
|
@ -52,6 +52,7 @@ component("printing_base") {
|
||||
public_configs = [ ":cups" ]
|
||||
}
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
cflags = []
|
||||
defines = [ "IS_PRINTING_BASE_IMPL" ]
|
||||
|
||||
@ -106,6 +107,7 @@ component("metafile") {
|
||||
"metafile_skia.h",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
defines = [ "IS_PRINTING_METAFILE_IMPL" ]
|
||||
public_deps = [
|
||||
":native_drawing_context",
|
||||
@ -161,6 +163,7 @@ component("printing") {
|
||||
"pwg_raster_settings.h",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
cflags = []
|
||||
defines = [ "IS_PRINTING_IMPL" ]
|
||||
|
||||
@ -274,6 +277,7 @@ static_library("test_support") {
|
||||
"test_printing_context.h",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
public_deps = [
|
||||
"//printing",
|
||||
"//printing/backend:test_support",
|
||||
@ -318,6 +322,7 @@ test("printing_unittests") {
|
||||
"units_unittest.cc",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
deps = [
|
||||
":printing",
|
||||
":test_support",
|
||||
|
@ -33,6 +33,7 @@ component("backend") {
|
||||
]
|
||||
|
||||
public_configs = []
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
cflags = []
|
||||
defines = [ "IS_PRINT_BACKEND_IMPL" ]
|
||||
|
||||
@ -150,6 +151,7 @@ source_set("test_support") {
|
||||
"test_print_backend.h",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
deps = [
|
||||
":backend",
|
||||
"//base",
|
||||
|
5
third_party/blink/common/BUILD.gn
vendored
5
third_party/blink/common/BUILD.gn
vendored
@ -62,7 +62,10 @@ source_set("common") {
|
||||
"//third_party/blink/public/common",
|
||||
]
|
||||
|
||||
configs += [ ":blink_common_implementation" ]
|
||||
configs += [
|
||||
":blink_common_implementation",
|
||||
"//build/config/compiler:noshadowing",
|
||||
]
|
||||
|
||||
sources = [
|
||||
# NOTE: Please do not add public headers that need to be referenced from
|
||||
|
4
third_party/blink/renderer/BUILD.gn
vendored
4
third_party/blink/renderer/BUILD.gn
vendored
@ -50,6 +50,8 @@ config("inside_blink") {
|
||||
"-Wno-implicit-int-conversion",
|
||||
]
|
||||
}
|
||||
|
||||
configs = [ "//build/config/compiler:noshadowing" ]
|
||||
}
|
||||
|
||||
# blink_pch --------------------------------------------------------------------
|
||||
@ -134,4 +136,6 @@ config("non_test_config") {
|
||||
if (is_clang) {
|
||||
cflags += [ "-Wglobal-constructors" ]
|
||||
}
|
||||
|
||||
configs = [ "//build/config/compiler:noshadowing" ]
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ component("controller") {
|
||||
}
|
||||
|
||||
configs += [
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
|
5
third_party/blink/renderer/core/BUILD.gn
vendored
5
third_party/blink/renderer/core/BUILD.gn
vendored
@ -133,7 +133,10 @@ config("blink_core_pch") {
|
||||
}
|
||||
}
|
||||
|
||||
core_config_add += [ ":blink_core_pch" ]
|
||||
core_config_add += [
|
||||
":blink_core_pch",
|
||||
"//build/config/compiler:noshadowing",
|
||||
]
|
||||
|
||||
source_set("core_common") {
|
||||
sources = [ "core_export.h" ]
|
||||
|
@ -19,6 +19,8 @@ buildflag_header("buildflags") {
|
||||
}
|
||||
|
||||
blink_core_sources("animation") {
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
|
||||
sources = [
|
||||
"animatable.cc",
|
||||
"animatable.h",
|
||||
|
@ -19,6 +19,8 @@ static_library("test_support") {
|
||||
}
|
||||
|
||||
blink_core_sources("exported") {
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
|
||||
sources = [
|
||||
"web_array_buffer.cc",
|
||||
"web_array_buffer_converter.cc",
|
||||
|
@ -36,6 +36,8 @@ source_set("generated") {
|
||||
|
||||
# Compiles the sources generated above.
|
||||
blink_core_sources("probe") {
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
|
||||
sources = [
|
||||
"async_task_id.h",
|
||||
"core_probes.cc",
|
||||
|
1
third_party/blink/renderer/platform/BUILD.gn
vendored
1
third_party/blink/renderer/platform/BUILD.gn
vendored
@ -131,6 +131,7 @@ config("blink_platform_config") {
|
||||
configs = [
|
||||
"//third_party/blink/renderer:config",
|
||||
"//third_party/blink/renderer:inside_blink",
|
||||
"//build/config/compiler:noshadowing",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,8 @@ config("wtf_config") {
|
||||
}
|
||||
|
||||
component("wtf") {
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
|
||||
sources = [
|
||||
"allocator/allocator.cc",
|
||||
"allocator/allocator.h",
|
||||
|
2
third_party/nearby/BUILD.gn
vendored
2
third_party/nearby/BUILD.gn
vendored
@ -457,8 +457,6 @@ source_set("platform_impl_shared_file") {
|
||||
":platform_public_types",
|
||||
"//third_party/abseil-cpp:absl",
|
||||
]
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
}
|
||||
|
||||
# src/cpp/platform/public
|
||||
|
@ -173,6 +173,8 @@ component("aura") {
|
||||
public += [ "screen_ozone.h" ]
|
||||
sources += [ "screen_ozone.cc" ]
|
||||
}
|
||||
|
||||
configs += [ "//build/config/compiler:noshadowing" ]
|
||||
}
|
||||
|
||||
static_library("test_support") {
|
||||
|
@ -270,6 +270,7 @@ component("gfx") {
|
||||
|
||||
configs += [
|
||||
"//build/config:precompiled_headers",
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
|
@ -7,6 +7,7 @@ import("//build/config/ui.gni")
|
||||
keyframe_animation_remove_configs = []
|
||||
keyframe_animation_add_configs = [
|
||||
"//build/config:precompiled_headers",
|
||||
"//build/config/compiler:noshadowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
|
@ -19,8 +19,6 @@ config("x11_private_config") {
|
||||
|
||||
config("build_xprotos_config") {
|
||||
cflags = [
|
||||
"-Wno-shadow",
|
||||
|
||||
# Generated proto files pull all fields from a struct into scope
|
||||
# even if they aren't used. Rather than adding logic in the
|
||||
# generator to determine which fields are used and keeping only
|
||||
|
@ -496,7 +496,10 @@ component("views") {
|
||||
]
|
||||
|
||||
sources += get_target_outputs(":views_vector_icons")
|
||||
configs += [ "//build/config:precompiled_headers" ]
|
||||
configs += [
|
||||
"//build/config:precompiled_headers",
|
||||
"//build/config/compiler:noshadowing",
|
||||
]
|
||||
defines = [ "VIEWS_IMPLEMENTATION" ]
|
||||
|
||||
deps = [
|
||||
|
Reference in New Issue
Block a user