Sync files.

This commit is contained in:
Michael Nebel
2023-03-17 14:38:13 +01:00
parent 0ec56203f9
commit 37484a415f
5 changed files with 50 additions and 0 deletions

View File

@@ -1050,6 +1050,16 @@ module Private {
not exists(interpretComponent(c))
}
/**
* Holds if token `part` of specification `spec` has an invalid index.
* E.g., `Argument[-1]`.
*/
predicate invalidIndexComponent(AccessPath spec, AccessPathToken part) {
part = spec.getToken(_) and
part.getName() = ["Parameter", "Argument"] and
AccessPath::parseInt(part.getArgumentList()) < 0
}
private predicate inputNeedsReference(AccessPathToken c) {
c.getName() = "Argument" or
inputNeedsReferenceSpecific(c)