add assertion

llvm-svn: 64652
This commit is contained in:
Chris Lattner 2009-02-16 19:27:54 +00:00
parent 99a83317b7
commit 1598a3a1a9
1 changed files with 1 additions and 0 deletions

View File

@ -2820,6 +2820,7 @@ Sema::DeclTy *Sema::ActOnFinishFunctionBody(DeclTy *D, StmtArg BodyArg) {
FD->setBody(Body);
assert(FD == getCurFunctionDecl() && "Function parsing confused");
} else if (ObjCMethodDecl *MD = dyn_cast_or_null<ObjCMethodDecl>(dcl)) {
assert(MD == getCurMethodDecl() && "Method parsing confused");
MD->setBody((Stmt*)Body);
} else {
Body->Destroy(Context);