diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-02-15 16:57:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-02-15 16:57:26 +0000 |
commit | 4773654f2700d6fbb20612fbb6763b35860fa74d (patch) | |
tree | 48bb63d5d1bdca8926cba42f0fac882e6cd2433f /lib/Sema/SemaAccess.cpp | |
parent | badb6cd2007825308208e6c4275ba54e220e4e28 (diff) |
Introduce a new initialization entity for lambda captures, and
specialize location information and diagnostics for this entity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAccess.cpp')
-rw-r--r-- | lib/Sema/SemaAccess.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaAccess.cpp b/lib/Sema/SemaAccess.cpp index 03eb4c3142..57d5e43f96 100644 --- a/lib/Sema/SemaAccess.cpp +++ b/lib/Sema/SemaAccess.cpp @@ -1481,6 +1481,13 @@ Sema::AccessResult Sema::CheckConstructorAccess(SourceLocation UseLoc, break; } + case InitializedEntity::EK_LambdaCapture: { + const VarDecl *Var = Entity.getCapturedVar(); + PD = PDiag(diag::err_access_lambda_capture); + PD << Var->getName() << Entity.getType() << getSpecialMember(Constructor); + break; + } + } return CheckConstructorAccess(UseLoc, Constructor, Access, PD); |