Skip to content

Commit 3999894

Browse files
committed
unified: Clarify description of derivedStoreReadStep
1 parent c58a096 commit 3999894

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,14 @@ module Track<TrackInputSig Input> {
264264
}
265265

266266
/**
267-
* Holds if `node1 -> node2` is derived by combining a store and a read step.
267+
* Holds if `node1 -> node2` is derived by combining a store and a read step, with zero or more value steps and inheritance steps in-between.
268268
*/
269269
pragma[nomagic]
270270
private predicate derivedStoreReadStep(NameBindingNode node1, NameBindingNode node2) {
271271
exists(NamespaceNode namespace, string name |
272-
node1 = namespace.getMember(name) and
273-
readStep(namespace.ref(), name, node2)
272+
node1 = namespace.getMember(name) and // getMember() combines a store step with subsequent inheritance steps
273+
readStep(namespace.ref(), name, node2) and
274+
node1 != node2
274275
)
275276
}
276277

0 commit comments

Comments
 (0)