]> granicus.if.org Git - clang/commitdiff
Fix <rdar://problem/6636803> [sema] crash on InterfaceBuilder.
authorSteve Naroff <snaroff@apple.com>
Mon, 2 Mar 2009 22:00:56 +0000 (22:00 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 2 Mar 2009 22:00:56 +0000 (22:00 +0000)
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

index 3aa525b796ddd3045429e8cbd528a7af364fdd8c..193a73f664db720069dad1811fda02860cfa531c 100644 (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;
 }