Rust: Make a return node the last node before function exit

This commit is contained in:
Simon Friis Vindum
2024-11-07 15:21:11 +01:00
parent 1a000ecb46
commit 22835c28ff

View File

@@ -190,7 +190,7 @@ module Node {
/** A data flow node that represents a value returned by a callable. */
final class ReturnNode extends ExprNode {
ReturnNode() { this.asExpr() instanceof ReturnExpr }
ReturnNode() { this.getCfgNode().getASuccessor() instanceof ExitCfgNode }
ReturnKind getKind() { any() }
}