[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)
commitd60bb2830797460acc7d061d1f81eddf22d7b857
tree3e563225d7ac41768cd976205804f49ad25a3f66
parent115a61560e24e08ecca0b3e2d16e8f1491b47f61
[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

llvm-svn: 286465
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Sema/ScopeInfo.h
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaLambda.cpp
clang/test/SemaCXX/warn-shadow-in-lambdas.cpp