Update javascript/ql/lib/Expressions/ExprHasNoEffect.qll

Co-authored-by: Asger F <asgerf@github.com>
This commit is contained in:
Napalys Klicius
2025-06-10 13:18:48 +02:00
committed by GitHub
parent c97da2eda5
commit e6f071ce46

View File

@@ -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