]> granicus.if.org Git - clang/commitdiff
add assertion
authorChris Lattner <sabre@nondot.org>
Mon, 16 Feb 2009 19:27:54 +0000 (19:27 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 16 Feb 2009 19:27:54 +0000 (19:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64652 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 444f85e77398653e95538913483a6e1ff77e4912..de438c3394e583001ae80e5c6f794515ffd3f89b 100644 (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);