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

Commits on Feb 23, 2024

  1. fix -Wshadow issue

    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
    palmje authored and facebook-github-bot committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    88da2bb View commit details
    Browse the repository at this point in the history