You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix violation of -Wshadow=compatible-local under gcc in UuidTest
Summary:
`INSTANTIATE_TEST_SUITE_P` uses the name `info` in a way that would be shadowed by the lambda passed to `INSTANTIATE_TEST_SUITE_P` also using the name `info`.
Issue reported to upstream gtest: google/googletest#4776.
Repro: https://godbolt.org/z/65oz63933.
Fixes the following build failure:
```
In file included from gtest/gtest.h:63,
from folly/portability/GTest.h:27,
from folly/codec/test/UuidTest.cpp:25:
folly/codec/test/UuidTest.cpp: In lambda function:
folly/codec/test/UuidTest.cpp:157:60: warning: declaration of ‘const testing::TestParamInfo<UuidParseTestParam>& info’ shadows a parameter [-Wshadow=compatible-local]
157 | [](const ::testing::TestParamInfo<UuidParseTestParam>& info) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
folly/codec/test/UuidTest.cpp:153:1: note: shadowed declaration is here
153 | INSTANTIATE_TEST_SUITE_P(
| ^~~~~~~~~~~~~~~~~~~~~~~~
folly/codec/test/UuidTest.cpp: In lambda function:
folly/codec/test/UuidTest.cpp:220:60: warning: declaration of ‘const testing::TestParamInfo<UuidParseTestParam>& info’ shadows a parameter [-Wshadow=compatible-local]
220 | [](const ::testing::TestParamInfo<UuidParseTestParam>& info) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
folly/codec/test/UuidTest.cpp:216:1: note: shadowed declaration is here
216 | INSTANTIATE_TEST_SUITE_P(
| ^~~~~~~~~~~~~~~~~~~~~~~~
```
Reviewed By: dmm-fb
Differential Revision: D76616505
fbshipit-source-id: 021b2fb73ea27abad13e9f2c967ab9f824b984d9
0 commit comments