We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9f81b0 commit 25d5cc7Copy full SHA for 25d5cc7
javascript/ql/src/semmle/javascript/Variables.qll
@@ -322,7 +322,7 @@ class LocalVariable extends Variable {
322
* Gets the location of a declaration of this variable.
323
*
324
* If the variable has multiple declarations, an arbitrary one is used.
325
- * If it has no declaration, the location of its declaring scope is used.
+ * If it has no declaration, the entry point of its declaring container is used.
326
*/
327
Location getLocation() {
328
result =
@@ -333,7 +333,7 @@ class LocalVariable extends Variable {
333
)
334
or
335
not exists(getADeclaration()) and
336
- result = getDeclaringContainer().getLocation()
+ result = getDeclaringContainer().getEntry().getLocation()
337
}
338
339
0 commit comments