Skip to content

Commit 4d48628

Browse files
committed
Preserve old behaviour of Write.writesComponent
1 parent d8891e3 commit 4d48628

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

go/ql/lib/semmle/go/controlflow/ControlFlowGraph.qll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,14 @@ module ControlFlow {
225225
}
226226

227227
/**
228-
* DEPRECATED: Use the disjunct of `writesElement` and `writesField` instead.
228+
* DEPRECATED: Use the disjunct of `writesElement` and `writesField`, or `writesFieldPreUpdate`
229+
* and `writesElementPreUpdate`, instead.
229230
*
230-
* Holds if this node sets any field or element of `base` to `rhs`.
231+
* Holds if this node sets any field or element of `base` (or its implicit dereference) to
232+
* `rhs`, where `base` represents the pre-update value.
231233
*/
232234
deprecated predicate writesComponent(DataFlow::Node base, DataFlow::Node rhs) {
233-
this.writesElement(base, _, rhs) or this.writesField(base, _, rhs)
235+
this.writesElementPreUpdate(base, _, rhs) or this.writesFieldPreUpdate(base, _, rhs)
234236
}
235237

236238
/**

0 commit comments

Comments
 (0)