diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 7 |
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 |