Merge remote-tracking branch 'origin/topic/awelzel/2285-assert-statement'

* origin/topic/awelzel/2285-assert-statement:
  NEWS: Small section about assert statement
  Stmt: Rework assertion hooks break semantics
  Stmt: Introduce assert statement and related hooks
  ZeekArgs: Helper for empty arguments
  Reporter: Allow AssertStmt to throw InterpreterException
  Lift backtrace() code into Func.{h,cc}
This commit is contained in:
Arne Welzel 2023-06-14 12:51:08 +02:00
commit 2f1ea789d1
50 changed files with 783 additions and 47 deletions

View file

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