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 | 20139d3809feca572399f3751a216dfff678e44d (patch) | |
tree | 0c9b7821acbcb369bf3cc8ecb1d747a962de7666 /clang/lib/Sema/TreeTransform.h | |
parent | 0c8fa7b8edba4bfb44f9b25180e4f0e878c2a0ae (diff) | |
download | bcm5719-llvm-20139d3809feca572399f3751a216dfff678e44d.tar.gz bcm5719-llvm-20139d3809feca572399f3751a216dfff678e44d.zip |
Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals.
llvm-svn: 147917
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 7995b0ba77c..4908e883b83 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/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()); |