mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
Fix description and improve predicate name of VarWrite.
This commit is contained in:
@@ -1850,7 +1850,7 @@ class VarWrite extends VarAccess {
|
|||||||
VarWrite() { this.isVarWrite() }
|
VarWrite() { this.isVarWrite() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the right-hand side of the assignment that executes this variable write.
|
* Gets a source of the assignment that executes this variable write.
|
||||||
*
|
*
|
||||||
* For assignments using the `=` operator, the source expression
|
* For assignments using the `=` operator, the source expression
|
||||||
* is simply the RHS of the assignment.
|
* is simply the RHS of the assignment.
|
||||||
@@ -1859,7 +1859,10 @@ class VarWrite extends VarAccess {
|
|||||||
* (such as (`+=`), both the RHS and the LHS of the compound assignment
|
* (such as (`+=`), both the RHS and the LHS of the compound assignment
|
||||||
* are source expressions of the assignment.
|
* are source expressions of the assignment.
|
||||||
*/
|
*/
|
||||||
Expr getRhs() { exists(Assignment e | e.getDest() = this and e.getSource() = result) }
|
Expr getASource() { exists(Assignment e | e.getDest() = this and e.getSource() = result) }
|
||||||
|
|
||||||
|
/** DEPRECATED: (Inaccurately-named) alias for `getASource` */
|
||||||
|
deprecated Expr getRhs() { result = this.getASource() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** DEPRECATED: Alias for `VarWrite`. */
|
/** DEPRECATED: Alias for `VarWrite`. */
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ predicate interpretInputSpecific(string c, InterpretNode mid, InterpretNode n) {
|
|||||||
exists(FieldWrite fw |
|
exists(FieldWrite fw |
|
||||||
c = "" and
|
c = "" and
|
||||||
fw.getField() = mid.asElement() and
|
fw.getField() = mid.asElement() and
|
||||||
n.asNode().asExpr() = fw.getRhs()
|
n.asNode().asExpr() = fw.getASource()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user