Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix -Wshadow issue #9437

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix -Wshadow issue #9437

wants to merge 1 commit into from

Conversation

palmje
Copy link
Contributor

@palmje palmje commented Feb 23, 2024

Summary:
-Wshadow triggered in LLVM-17:

fbcode/folly/futures/ThreadWheelTimekeeper.cpp:61:42: error: declaration shadows a structured binding [-Werror,-Wshadow]                                                                      
   61 |   eventBase_.runInEventBaseThread([this, cob = std::move(cob), dur] {                                                                                                                 
      |                                          ^                                                                                                                                            
fbcode/folly/futures/ThreadWheelTimekeeper.cpp:47:9: note: previous declaration is here        
   47 |   auto [cob, sf] = WTCallback<HHWheelTimer>::create(&eventBase_);                                                                                                                     
      |         ^

This seems to only be triggered in llvm-17, llvm-15 doesn't pick it up:

$ buck2 build -c cxx.extra_cxxflags=-Wshadow folly/futures:core
...                                                                                                                                              
BUILD SUCCEEDE

Differential Revision: D54112254

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54112254

Summary:
-Wshadow triggered in LLVM-17:
```
fbcode/folly/futures/ThreadWheelTimekeeper.cpp:61:42: error: declaration shadows a structured binding [-Werror,-Wshadow]                                                                      
   61 |   eventBase_.runInEventBaseThread([this, cob = std::move(cob), dur] {                                                                                                                 
      |                                          ^                                                                                                                                            
fbcode/folly/futures/ThreadWheelTimekeeper.cpp:47:9: note: previous declaration is here        
   47 |   auto [cob, sf] = WTCallback<HHWheelTimer>::create(&eventBase_);                                                                                                                     
      |         ^
```

This seems to only be triggered in llvm-17, llvm-15 doesn't pick it up:
```
$ buck2 build -c cxx.extra_cxxflags=-Wshadow folly/futures:core
...                                                                                                                                              
BUILD SUCCEEDE
```

Differential Revision: D54112254
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54112254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants