Skip to content

Commit

Permalink
Rust: Make a return node the last node before function exit
Browse files Browse the repository at this point in the history
  • Loading branch information
paldepind committed Nov 7, 2024
1 parent 1a000ec commit 22835c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}
Expand Down

0 comments on commit 22835c2

Please sign in to comment.