patch to prevent crash in hopelessly incorrect

method definition with labels.

llvm-svn: 80381
This commit is contained in:
Fariborz Jahanian 2009-08-28 17:52:37 +00:00
parent a654dd8ae8
commit b1771e4e74
1 changed files with 1 additions and 0 deletions

View 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;