Instantiate the BlockDecl in ActOnBlockStart() so we can use it as a DeclContext.
This required changes to attach the compound statement later on (like we do for functions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57304 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index c900a73..fe2e95d 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -77,10 +77,9 @@
}
BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
- ParmVarDecl **args, unsigned numargs,
- CompoundStmt *body) {
+ ParmVarDecl **args, unsigned numargs) {
void *Mem = C.getAllocator().Allocate<BlockDecl>();
- return new (Mem) BlockDecl(DC, L, args, numargs, body);
+ return new (Mem) BlockDecl(DC, L, args, numargs);
}
FieldDecl *FieldDecl::Create(ASTContext &C, SourceLocation L,