diff options
| author | Steve Naroff <snaroff@apple.com> | 2008-10-08 17:01:13 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2008-10-08 17:01:13 +0000 |
| commit | 415d3d570a5ee2d41fd7ae485395bcd4a41dae64 (patch) | |
| tree | 42d12c676fa0876433d7d3fa6da27289eff0589f /clang/lib/Sema/SemaExpr.cpp | |
| parent | d83529e8c4d99a053b0128caa79d49dc65f015d4 (diff) | |
| download | bcm5719-llvm-415d3d570a5ee2d41fd7ae485395bcd4a41dae64.tar.gz bcm5719-llvm-415d3d570a5ee2d41fd7ae485395bcd4a41dae64.zip | |
- Add BlockDecl AST node.
- Modify BlockExpr to reference the BlockDecl.
This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).
Still some follow-up work to finish this (forthcoming).
llvm-svn: 57298
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index fa18ce313e4..b8b614db073 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2931,8 +2931,11 @@ Sema::ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, StmtTy *body, BSI->isVariadic); BlockTy = Context.getBlockPointerType(BlockTy); - return new BlockExpr(CaretLoc, BlockTy, &BSI->Params[0], BSI->Params.size(), - Body.take()); + + BlockDecl *NewBD = BlockDecl::Create(Context, CurContext, CaretLoc, + &BSI->Params[0], BSI->Params.size(), + Body.take()); + return new BlockExpr(NewBD, BlockTy); } /// ExprsMatchFnType - return true if the Exprs in array Args have |

