summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-20 07:05:55 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-20 07:05:55 +0000
commitdeb5e728aef66d4c255731fc1bec4f1f075c8885 (patch)
tree869d61e77129c0a1ec973dc780219fd791c7458c /clang/lib/Sema/SemaDecl.cpp
parentbdd062dae0f27953ec77039a171d0f2b8fe72dfc (diff)
downloadbcm5719-llvm-deb5e728aef66d4c255731fc1bec4f1f075c8885.tar.gz
bcm5719-llvm-deb5e728aef66d4c255731fc1bec4f1f075c8885.zip
Don't try to check jump scopes in invalid functions. Fixes
<rdar://problem/7995494>. llvm-svn: 104217
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 30eaee423bd..af9848fb1ab 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -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))
OpenPOWER on IntegriCloud