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).
llvm-svn: 57304
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index c900a73..fe2e95d 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/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,