Skip to content

Commit 787b80f

Browse files
committed
Python: ObjectAPI.qll: Adds getOrigin predicate
1 parent f4f8c6e commit 787b80f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/ql/src/semmle/python/objects/ObjectAPI.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class Value extends TObject {
4444
PointsToInternal::pointsTo(result, _, this, _)
4545
}
4646

47+
/** Gets the origin AST node for this value. */
48+
AstNode getOrigin() {
49+
result = this.(ObjectInternal).getOrigin().getNode()
50+
}
51+
52+
4753
/** Gets the class of this object.
4854
* Strictly, the `Value` representing the class of the objects
4955
* represented by this Value.

0 commit comments

Comments
 (0)