Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.
llvm-svn: 70242
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 93e30ec..cf24029 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/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()),