forked from OSchip/llvm-project
patch to prevent crash in hopelessly incorrect
method definition with labels. llvm-svn: 80381
This commit is contained in:
parent
a654dd8ae8
commit
b1771e4e74
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue