mirror of
https://github.com/github/codeql.git
synced 2026-01-29 06:12:58 +01:00
Python: Add attributeClearStep
This commit is contained in:
@@ -1973,6 +1973,18 @@ predicate clearsContent(Node n, Content c) {
|
||||
kwOverflowClearStep(n, c)
|
||||
or
|
||||
matchClearStep(n, c)
|
||||
or
|
||||
attributeClearStep(n, c)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if values stored inside attribute `c` are cleared at node `n`.
|
||||
*
|
||||
* In `obj.foo = x` the any old value stored in `foo` is cleared at the pre-update node
|
||||
* associated with `obj`
|
||||
*/
|
||||
predicate attributeClearStep(Node n, AttributeContent c) {
|
||||
exists(PostUpdateNode post | post.getPreUpdateNode() = n | attributeStoreStep(_, c, post))
|
||||
}
|
||||
|
||||
//--------
|
||||
|
||||
Reference in New Issue
Block a user