[cfe-commits] r104217 - /cfe/trunk/lib/Sema/SemaDecl.cpp

John McCall rjmccall at apple.com
Thu May 20 00:05:55 PDT 2010


Author: rjmccall
Date: Thu May 20 02:05:55 2010
New Revision: 104217

URL: http://llvm.org/viewvc/llvm-project?rev=104217&view=rev
Log:
Don't try to check jump scopes in invalid functions.  Fixes
<rdar://problem/7995494>.


Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=104217&r1=104216&r2=104217&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu May 20 02:05:55 2010
@@ -4693,7 +4693,9 @@
     
     // 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))





More information about the cfe-commits mailing list