]> granicus.if.org Git - clang/commit
[Sema] Avoid -Wshadow warnings for shadowed variables that
authorAlex Lorenz <arphaman@gmail.com>
Thu, 10 Nov 2016 16:19:11 +0000 (16:19 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Thu, 10 Nov 2016 16:19:11 +0000 (16:19 +0000)
commit12521258393b72f20e285c90310389d421224a92
tree716a89e1c12308a9b9808032e7fdeef722ecef2d
parentba58685ce88db472f3774944435eb4948d762bb9
[Sema] Avoid -Wshadow warnings for shadowed variables that
aren't captured by lambdas with a default capture specifier

This commit is a follow-up to r286354. It 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 or -Wshadow-uncaptured-local.

rdar://14984176

Differential Revision: https://reviews.llvm.org/D26448

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286465 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/ScopeInfo.h
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaLambda.cpp
test/SemaCXX/warn-shadow-in-lambdas.cpp