Fix <rdar://problem/6636803> [sema] crash on InterfaceBuilder.

Parser::ParseObjCMethodDefinition(): Make sure we don't exit the BodyScope until ActOnFinishFunctionBody() is complete.

llvm-svn: 65880
This commit is contained in:
Steve Naroff 2009-03-02 22:00:56 +00:00
parent bf8e842b67
commit b94d7f65fa
1 changed files with 3 additions and 2 deletions

View File

@ -1386,11 +1386,12 @@ Parser::DeclTy *Parser::ParseObjCMethodDefinition() {
FnBody = Actions.ActOnCompoundStmt(BraceLoc, BraceLoc,
MultiStmtArg(Actions), false);
// TODO: Pass argument information.
Actions.ActOnFinishFunctionBody(MDecl, move(FnBody));
// Leave the function body scope.
BodyScope.Exit();
// TODO: Pass argument information.
Actions.ActOnFinishFunctionBody(MDecl, move(FnBody));
return MDecl;
}