Python: AttrRef getOjbect/1 -> accesses/2

See this thread for discussion:
https://github.com/github/codeql/pull/5926#discussion_r635384981
This commit is contained in:
Rasmus Wriedt Larsen
2021-06-22 15:21:40 +02:00
parent 3b41c2f204
commit e56dfe75bd

View File

@@ -18,12 +18,10 @@ abstract class AttrRef extends Node {
abstract Node getObject();
/**
* Gets the data flow node corresponding to the object whose attribute named
* `attrName` is being read or written.
* Holds if this data flow node accesses attribute named `attrName` on object `object`.
*/
Node getObject(string attrName) {
result = this.getObject() and
attrName = this.getAttributeName()
predicate accesses(Node object, string attrName) {
this.getObject() = object and getAttributeName() = attrName
}
/**