diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-01-11 02:36:31 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-01-11 02:36:31 +0000 |
commit | b69b42c55d56815bab62991bf839cdb41634d3af (patch) | |
tree | cf53ef3a01c1b51064cf66532e9dc00fa4369ecf /lib/Sema/TreeTransform.h | |
parent | 52f220df136eaa96b648d8ce0cc29b62c48d645c (diff) |
Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147917 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r-- | lib/Sema/TreeTransform.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index 7995b0ba77..4908e883b8 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -1890,6 +1890,7 @@ public: ExprResult RebuildCXXThisExpr(SourceLocation ThisLoc, QualType ThisType, bool isImplicit) { + getSema().CheckCXXThisCapture(ThisLoc); return getSema().Owned( new (getSema().Context) CXXThisExpr(ThisLoc, ThisType, isImplicit)); @@ -8114,10 +8115,6 @@ TreeTransform<Derived>::TransformBlockExpr(BlockExpr *E) { BlockScopeInfo *blockScope = SemaRef.getCurBlock(); blockScope->TheDecl->setIsVariadic(oldBlock->isVariadic()); - // We built a new blockScopeInfo in call to ActOnBlockStart - // in above, CapturesCXXThis need be set here from the block - // expression. - blockScope->CapturesCXXThis = oldBlock->capturesCXXThis(); blockScope->TheDecl->setBlockMissingReturnType( oldBlock->blockMissingReturnType()); |