зеркало из https://github.com/microsoft/clang-1.git
Don't try to check jump scopes in invalid functions. Fixes
<rdar://problem/7995494>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104217 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
cb359df81b
Коммит
dae69ef4c5
|
@ -4693,7 +4693,9 @@ Sema::DeclPtrTy Sema::ActOnFinishFunctionBody(DeclPtrTy D, StmtArg BodyArg,
|
|||
|
||||
// Verify that that gotos and switch cases don't jump into scopes illegally.
|
||||
// Verify that that gotos and switch cases don't jump into scopes illegally.
|
||||
if (FunctionNeedsScopeChecking() && !hasAnyErrorsInThisFunction())
|
||||
if (FunctionNeedsScopeChecking() &&
|
||||
!FD->isInvalidDecl() &&
|
||||
!hasAnyErrorsInThisFunction())
|
||||
DiagnoseInvalidJumps(Body);
|
||||
|
||||
if (CXXDestructorDecl *Destructor = dyn_cast<CXXDestructorDecl>(dcl))
|
||||
|
|
Загрузка…
Ссылка в новой задаче