Skip to content

Commit d5d56cd

Browse files
committed
Dead store of field: count passing to a vararg function as escaping
1 parent a319fc0 commit d5d56cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ql/src/RedundantCode/DeadStoreOfField.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ predicate escapes(DataFlow::Node nd) {
3636
exists(SendStmt s | nd.asExpr() = s.getValue())
3737
or
3838
// if `nd` is passed to a function, then it escapes
39-
nd instanceof DataFlow::ArgumentNode
39+
nd = any(DataFlow::CallNode c).getASyntacticArgument()
4040
or
4141
// if `nd` has its address taken, then it escapes
4242
exists(AddressExpr ae | nd.asExpr() = ae.getOperand())

0 commit comments

Comments
 (0)