We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a14f7dd + 99c2119 commit 7c5fef3Copy full SHA for 7c5fef3
go/ql/src/RedundantCode/DeadStoreOfField.ql
@@ -38,6 +38,9 @@ predicate escapes(DataFlow::Node nd) {
38
// if `nd` is passed to a function, then it escapes
39
nd = any(DataFlow::CallNode c).getASyntacticArgument()
40
or
41
+ // if `nd` is the receiver of a function, then it escapes
42
+ nd = any(DataFlow::MethodCallNode c).getReceiver()
43
+ or
44
// if `nd` has its address taken, then it escapes
45
exists(AddressExpr ae | nd.asExpr() = ae.getOperand())
46
0 commit comments