Address review comments.

This commit is contained in:
Max Schaefer
2020-02-17 09:13:49 +00:00
parent f60b5daf94
commit ec9ba8aa7f
18 changed files with 44 additions and 33 deletions

View File

@@ -16,7 +16,7 @@ from
ControlFlow::ConditionGuardNode cond, DataFlow::CallNode lenA
where
// `i` is incremented in `fs`
fs.getPost().(IncStmt).getExpr() = i.getAReference() and
fs.getPost().(IncStmt).getOperand() = i.getAReference() and
// `idx` reads `a[i]`
idx.reads(a.getANode(), i.getARead()) and
// `lenA` is `len(a)`

View File

@@ -36,7 +36,7 @@ predicate bounds(RelationalComparisonExpr test, Variable v, string direction) {
* downward.
*/
predicate updates(IncDecStmt upd, Variable v, string direction) {
upd.getExpr() = v.getAReference() and
upd.getOperand() = v.getAReference() and
(
upd instanceof IncStmt and direction = "upward"
or