[Sema] Recontextualize BreakStmt + ContinueStmt in lazy vars

I don't think this currently matters, but ensure
we re-contextualize BreakStmts and ContinueStmts
in RecontextualizeClosures since these statements
store DeclContexts.
This commit is contained in:
Hamish Knight
2024-08-14 19:59:05 +01:00
parent 34fa48f279
commit 4470814db8
2 changed files with 8 additions and 0 deletions

View File

@@ -1613,6 +1613,7 @@ public:
}
DeclContext *getDeclContext() const { return DC; }
void setDeclContext(DeclContext *newDC) { DC = newDC; }
static bool classof(const Stmt *S) {
return S->getKind() == StmtKind::Break;
@@ -1648,6 +1649,7 @@ public:
}
DeclContext *getDeclContext() const { return DC; }
void setDeclContext(DeclContext *newDC) { DC = newDC; }
static bool classof(const Stmt *S) {
return S->getKind() == StmtKind::Continue;