From 32ce8376efb7e0d70e5f7e8fcf685130293f412b Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Mon, 2 Mar 2009 22:00:56 +0000 Subject: [PATCH] Fix [sema] crash on InterfaceBuilder. Parser::ParseObjCMethodDefinition(): Make sure we don't exit the BodyScope until ActOnFinishFunctionBody() is complete. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65880 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Parse/ParseObjc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 3aa525b796..193a73f664 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -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; } -- 2.40.0