This is an archive of the discontinued LLVM Phabricator instance.

Avoid -Wshadow warnings for shadowed variables that aren't captured by lambdas with a default capture specifier
ClosedPublic

Authored by arphaman on Nov 9 2016, 4:43 AM.

Details

Summary

This is a follow-up patch to r286354. This patch avoids the -Wshadow warning for variables which shadow variables that aren't captured by lambdas with a default capture specifier. It provides an additional note that points to location of the capture.

The old behaviour is preserved with -Wshadow-all.

This fixes PR 21426 fully.

Diff Detail

Repository
rL LLVM

Event Timeline

arphaman updated this revision to Diff 77335.Nov 9 2016, 4:43 AM
arphaman retitled this revision from to Avoid -Wshadow warnings for shadowed variables that aren't captured by lambdas with a default capture specifier.
arphaman updated this object.
arphaman added reviewers: rnk, rsmith.
arphaman set the repository for this revision to rL LLVM.
arphaman added a subscriber: cfe-commits.
rnk accepted this revision.Nov 9 2016, 11:38 AM
rnk edited edge metadata.

lgtm, thanks

This revision is now accepted and ready to land.Nov 9 2016, 11:38 AM
This revision was automatically updated to reflect the committed changes.