mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Update javascript/ql/lib/Expressions/ExprHasNoEffect.qll
Co-authored-by: Asger F <asgerf@github.com>
This commit is contained in:
@@ -181,7 +181,7 @@ predicate hasNoEffect(Expr e) {
|
||||
// exclude expressions that are part of a conditional expression
|
||||
not exists(ConditionalExpr cond | e.getParent() = cond |
|
||||
e instanceof NullLiteral or
|
||||
e instanceof GlobalVarAccess or
|
||||
e.(GlobalVarAccess).getName() = "undefined" or
|
||||
e.(NumberLiteral).getIntValue() = 0 or
|
||||
e.(UnaryExpr).getOperator() = "void"
|
||||
) and
|
||||
|
||||
Reference in New Issue
Block a user