mirror of
https://github.com/github/codeql.git
synced 2026-02-23 02:13:41 +01:00
18 lines
439 B
Plaintext
18 lines
439 B
Plaintext
/**
|
|
* @name Dead SSA definition
|
|
* @description Each SSA definition should have at least one use.
|
|
* @kind problem
|
|
* @problem.severity error
|
|
* @id js/consistency/dead-ssa-definition
|
|
* @tags consistency
|
|
*/
|
|
|
|
import javascript
|
|
|
|
from SsaVariable d
|
|
where
|
|
not exists(d.getAUse()) and
|
|
not d = any(SsaPseudoDefinition phi).getAnInput() and
|
|
d.getSourceVariable() instanceof PurelyLocalVariable
|
|
select d, "Dead SSA definition " + d + "."
|