diff --git a/support/internal/BUILD b/support/internal/BUILD index 15a947227..1c1c60a72 100644 --- a/support/internal/BUILD +++ b/support/internal/BUILD @@ -16,6 +16,7 @@ cc_library( "slot.h", ], compatible_with = ["//buildenv/target:non_prod"], + copts = ["-Wshadow"], visibility = [ "//visibility:public", ], diff --git a/support/internal/slot.h b/support/internal/slot.h index 4374ed6f5..0d219d856 100644 --- a/support/internal/slot.h +++ b/support/internal/slot.h @@ -146,7 +146,7 @@ class Slot> { using T = std::array; Slot() {} explicit constexpr Slot(T&& x) { - if constexpr (requires(UT x) { UT(UnsafeRelocateTag{}, std::move(x)); }) { + if constexpr (requires(UT t) { UT(UnsafeRelocateTag{}, std::move(t)); }) { memcpy(value_.data(), x.data(), sizeof(UT) * S); } else { value_ = std::move(x);