From 32844b35f61e04b23618e19c5ea41d57b975f9ac Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 28 Aug 2009 17:52:37 +0000 Subject: [PATCH] patch to prevent crash in hopelessly incorrect 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 367f235cbe..988680a981 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -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; -- 2.40.0