Stmt: Introduce assert statement and related hooks

including two hooks called assertion_failure() and assertion_result() for
customization and tracking of assertion results.
This commit is contained in:
Arne Welzel 2023-06-05 19:13:14 +02:00
parent a25b1a9d59
commit 25ea678626
41 changed files with 635 additions and 3 deletions

View file

@ -919,6 +919,12 @@ StmtPtr InitStmt::DoReduce(Reducer* c)
return ThisPtr();
}
StmtPtr AssertStmt::Duplicate()
{
// Is this right?
return SetSucc(new AssertStmt(cond->Duplicate(), msg ? msg->Duplicate() : nullptr));
}
StmtPtr WhenStmt::Duplicate()
{
FuncType::CaptureList* cl_dup = nullptr;