Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70242 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 93e30ec..cf24029 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -1156,6 +1156,7 @@
   // Neither of these are explicitly forbidden, but every compiler detects them
   // and warns.
 
+  CurFunctionNeedsScopeChecking = true;
   RawHandlers.release();
   return Owned(new (Context) CXXTryStmt(TryLoc,
                                         static_cast<Stmt*>(TryBlock.release()),