]> git-server-git.apps.pok.os.sepia.ceph.com Git - googletest.git/commit
Fix -Wshadow warnings
authorTom Hughes <tomhughes@google.com>
Thu, 12 Jan 2023 17:03:40 +0000 (09:03 -0800)
committerCopybara-Service <copybara-worker@google.com>
Thu, 12 Jan 2023 17:04:13 +0000 (09:04 -0800)
commit356fc301251378e0f6fa6aa794d73714202887ac
treef109e63fe7b66acfe4d1077bba37fcff8710cd2a
parentb5401fef68794d93b7fcd933bc3692211e8ebad1
Fix -Wshadow warnings

../googlemock/test/gmock-actions_test.cc:687:36: warning: declaration of ‘v’ shadows a member of ‘testing::{anonymous}::ReturnTest_SupportsReferenceLikeReturnType_Test::TestBody()::Result’ [-Wshadow]
  687 |     Result(const std::vector<int>& v) : v(&v) {}  // NOLINT
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^
../googlemock/test/gmock-actions_test.cc:686:29: note: shadowed declaration is here
  686 |     const std::vector<int>* v;
      |                             ^

../googlemock/test/gmock-actions_test.cc: In constructor ‘testing::{anonymous}::ReturnTest_PrefersConversionOperator_Test::TestBody()::Out::Out(int)’:
../googlemock/test/gmock-actions_test.cc:720:28: warning: declaration of ‘x’ shadows a member of ‘testing::{anonymous}::ReturnTest_PrefersConversionOperator_Test::TestBody()::Out’ [-Wshadow]
  720 |     explicit Out(const int x) : x(x) {}
      |                  ~~~~~~~~~~^
../googlemock/test/gmock-actions_test.cc:718:9: note: shadowed declaration is here
  718 |     int x;
      |         ^

PiperOrigin-RevId: 501580618
Change-Id: I584710fbbe440ec724f88746e51f3be5653c32d5
googlemock/test/gmock-actions_test.cc