Skip to content

Commit f7aeeb6

Browse files
committed
unified: Add TODO for short-hand returns
1 parent ed3b85c commit f7aeeb6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎unified/ql/lib/codeql/unified/internal/dataflow/DataFlowInstantiation.qll‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ module DataFlowInput implements InputSig<Location> {
2323
// Parameter, argument, return, and out nodes and their positions/kinds
2424
//
2525
class ReturnNode extends Node {
26-
ReturnNode() { this.asExpr() = any(ReturnExpr r).getValue() }
26+
ReturnNode() {
27+
// TODO: Handle short-hand returns such as `func foo() -> Int { 5 }`
28+
this.asExpr() = any(ReturnExpr r).getValue()
29+
}
2730

2831
ReturnKind getKind() { exists(result) }
2932
}

0 commit comments

Comments
 (0)