aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-10-08 17:01:13 +0000
committerSteve Naroff <snaroff@apple.com>2008-10-08 17:01:13 +0000
commit56ee6896f2efebffb4a2cce5a7610cdf1eddbbbe (patch)
tree27e5894e15c4faaea557fd1f88702f626aea2fed /lib/Sema/SemaExpr.cpp
parent178927517fa09ddbb04dc8ef725b5716c18aae21 (diff)
- 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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index fa18ce313e..b8b614db07 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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