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:
Max Schaefer
2020-01-14 07:15:43 +00:00
parent d339d55faa
commit efc72fa01a
13 changed files with 78 additions and 40 deletions

View File

@@ -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