mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
Remove Entity.getAUse() and replace uses with getAReference().
The former had result type `Ident`, so it wouldn't pick up references to methods and fields. Apart from that, it is subsumed by the latter anyway.
This commit is contained in:
@@ -23,9 +23,9 @@ import go
|
||||
* downward.
|
||||
*/
|
||||
predicate bounds(RelationalComparisonExpr test, Variable v, string direction) {
|
||||
test.getLesserOperand() = v.getAUse() and direction = "upward"
|
||||
test.getLesserOperand() = v.getAReference() and direction = "upward"
|
||||
or
|
||||
test.getGreaterOperand() = v.getAUse() and direction = "downward"
|
||||
test.getGreaterOperand() = v.getAReference() and direction = "downward"
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ predicate bounds(RelationalComparisonExpr test, Variable v, string direction) {
|
||||
* downward.
|
||||
*/
|
||||
predicate updates(IncDecStmt upd, Variable v, string direction) {
|
||||
upd.getExpr() = v.getAUse() and
|
||||
upd.getExpr() = v.getAReference() and
|
||||
(
|
||||
upd instanceof IncStmt and direction = "upward"
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user