Introduce Parameter::getAVariable()

This commit is contained in:
Tom Hvitved
2020-12-01 13:00:30 +01:00
parent 965b351cde
commit bde9f59e0e
8 changed files with 80 additions and 20 deletions

View File

@@ -123,11 +123,7 @@ private module Cached {
cached
predicate access(Generated::Identifier access, Variable variable) {
exists(string name |
name = access.getValue() and
// Do not generate an access at the defining location
not variable = TLocalVariable(_, name, access)
|
exists(string name | name = access.getValue() |
variable = enclosingScope(access).getVariable(name) and
not strictlyBefore(access.getLocation(), variable.getLocation())
or