Skip to content

Commit e465811

Browse files
Napalysasgerf
andcommitted
Update javascript/ql/lib/Expressions/ExprHasNoEffect.qll
Co-Authored-By: Asger F <[email protected]>
1 parent 496d8d4 commit e465811

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/lib/Expressions/ExprHasNoEffect.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ predicate hasNoEffect(Expr e) {
183183
e instanceof NullLiteral or
184184
e.(GlobalVarAccess).getName() = "undefined" or
185185
e.(NumberLiteral).getIntValue() = 0 or
186-
e.(UnaryExpr).getOperator() = "void"
186+
e instanceof VoidExpr
187187
) and
188188
// exclude the first statement of a try block
189189
not e = any(TryStmt stmt).getBody().getStmt(0).(ExprStmt).getExpr() and

0 commit comments

Comments
 (0)