smeenai added a comment.
Herald added a project: All.

This is very belated, sorry :)

Our shadowing warnings have special behavior for lambdas and local variables: 
the warning for lambdas shadowing uncaptured local variables falls under 
`-Wshadow-uncaptured-local`, which isn't turned on for `-Wshadow` (only for 
`-Wshadow-all`). However, this doesn't extend to structured bindings. Compare 
https://godbolt.org/z/nP6b9f8o4, which doesn't fire for `-Wshadow`, to 
https://godbolt.org/z/9he8Ezsbb, which is the equivalent with structured 
bindings and does fire for `-Wshadow`. This is triggering a whole bunch of new 
`-Wshadow` warnings in our codebase, and I'm wondering if we'd consider also 
separating the lambda + structured binding case into its own warning group, to 
match the behavior for lambdas + local variables.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96147/new/

https://reviews.llvm.org/D96147

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to