CodeQL library for JavaScript
codeql/javascript-all 0.5.1 ( changelog , source )
Search

Module DefUse

Provides classes and predicates for working with variable definitions and uses.

Import path

import semmle.javascript.DefUse

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

definitionReaches

Holds if the definition of v in def reaches use along some control flow path without crossing another definition of v. DEPRECATED: Use the SSA.qll library instead.

localDefinitionOverwrites

Holds if the later definition of v could overwrite its earlier definition.

localDefinitionReaches

Holds if the definition of local variable v in def reaches use along some control flow path without crossing another definition of v. DEPRECATED: Use the SSA.qll library instead.

Classes

LValue

A variable reference or property access that is written to.

RValue

A variable reference or property access that is read from.

RefExpr

An expression that can be evaluated to a reference, that is, a variable reference or a property access.

VarDef

A ControlFlowNode that defines (that is, initializes or updates) variables or properties.

VarUse

A ControlFlowNode that uses (that is, reads from) a single variable.