================
@@ -3267,12 +3267,22 @@ Sema::ActOnIndirectGotoStmt(SourceLocation GotoLoc,
SourceLocation StarLoc,
return new (Context) IndirectGotoStmt(GotoLoc, StarLoc, E);
}
-static void CheckJumpOutOfSEHFinally(Sema &S, SourceLocation Loc,
- const Scope &DestScope) {
+static void CheckJumpOutOfSEHFinallyOrDefer(Sema &S, SourceLocation Loc,
+ const Scope &DestScope,
+ unsigned DeferJumpKind) {
if (!S.CurrentSEHFinally.empty() &&
DestScope.Contains(*S.CurrentSEHFinally.back())) {
S.Diag(Loc, diag::warn_jump_out_of_seh_finally);
}
+
+ if (!S.CurrentDefer.empty()) {
+ Scope *Parent = S.CurrentDefer.back().first;
+
----------------
cor3ntin wrote:
maybe an assert that Parent is not null would be useful here
https://github.com/llvm/llvm-project/pull/162848
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits