ivanmurashko wrote: > So current fix will introduce false negative with "-Wshadow-uncaptured-local" > and shadowing structured bindings, and, **hide the underlying issue**. It > would be great to find the difference of handling shadowing `VarDecl` and > `BindingDecl`.
The new commit c0723fefc075 addresses this by extending the existing lambda capture classification logic at lines 8501-8515 in `clang/lib/Sema/SemaDecl.cpp`. Previously, `VarDecl` had lambda capture handling (lines 8484-8500) while `BindingDecl` fell through to regular shadow detection, causing inconsistent warning classification. The fix ensures both `VarDecl` and `BindingDecl` follow the same lambda capture code path, making `[val = val]` and `[a = a]` (where `a` is from structured binding) behave identically. https://github.com/llvm/llvm-project/pull/157667 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits