mirror of
https://github.com/github/codeql.git
synced 2026-02-20 08:53:49 +01:00
Address review comments
This commit is contained in:
@@ -125,7 +125,12 @@ private module Cached {
|
||||
predicate access(Generated::Identifier access, Variable variable) {
|
||||
exists(string name | name = access.getValue() |
|
||||
variable = enclosingScope(access).getVariable(name) and
|
||||
not strictlyBefore(access.getLocation(), variable.getLocation())
|
||||
not strictlyBefore(access.getLocation(), variable.getLocation()) and
|
||||
// In case of overlapping parameter names, later parameters should not
|
||||
// be considered accesses to the first parameter
|
||||
if parameterAssignment(_, _, access)
|
||||
then scopeDefinesParameterVariable(_, _, access)
|
||||
else any()
|
||||
or
|
||||
exists(VariableScope declScope |
|
||||
variable = declScope.getVariable(name) and
|
||||
|
||||
Reference in New Issue
Block a user