mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
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:
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user