We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 496d8d4 commit e465811Copy full SHA for e465811
javascript/ql/lib/Expressions/ExprHasNoEffect.qll
@@ -183,7 +183,7 @@ predicate hasNoEffect(Expr e) {
183
e instanceof NullLiteral or
184
e.(GlobalVarAccess).getName() = "undefined" or
185
e.(NumberLiteral).getIntValue() = 0 or
186
- e.(UnaryExpr).getOperator() = "void"
+ e instanceof VoidExpr
187
) and
188
// exclude the first statement of a try block
189
not e = any(TryStmt stmt).getBody().getStmt(0).(ExprStmt).getExpr() and
0 commit comments