mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
new method for Stmt nodes to report whether they could execute a "return"
This commit is contained in:
parent
3d69b0551a
commit
087eb1ca4e
3 changed files with 40 additions and 1 deletions
|
@ -138,6 +138,12 @@ public:
|
|||
// in that case, they do lead to flow reaching the end.
|
||||
virtual bool NoFlowAfter(bool ignore_break) const { return false; }
|
||||
|
||||
// True if the statement could potentially execute a return. This is
|
||||
// used by script optimization to track confluence inside catch-return
|
||||
// blocks. Here, ignore_break is false if we're analyzing a coalesced
|
||||
// hook body.
|
||||
virtual bool CouldReturn(bool ignore_break) const { return false; }
|
||||
|
||||
// Access to the original statement from which this one is derived,
|
||||
// or this one if we don't have an original. Returns a bare pointer
|
||||
// rather than a StmtPtr to emphasize that the access is read-only.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue