]> granicus.if.org Git - clang/commitdiff
patch to prevent crash in hopelessly incorrect
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 28 Aug 2009 17:52:37 +0000 (17:52 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 28 Aug 2009 17:52:37 +0000 (17:52 +0000)
method definition with labels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80381 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclObjC.cpp

index 367f235cbe0f24a820df3a8cf76c0a9e28d16aa3..988680a981c9f4dc3510cfed02050faa41fc0f2f 100644 (file)
@@ -1664,6 +1664,7 @@ Sema::DeclPtrTy Sema::ActOnMethodDeclaration(
   // Make sure we can establish a context for the method.
   if (!ClassDecl) {
     Diag(MethodLoc, diag::error_missing_method_context);
+    FunctionLabelMap.clear();
     return DeclPtrTy();
   }
   QualType resultDeclType;