mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Update javascript/ql/lib/Expressions/ExprHasNoEffect.qll
Co-Authored-By: Asger F <316427+asgerf@users.noreply.github.com>
This commit is contained in:
@@ -183,7 +183,7 @@ predicate hasNoEffect(Expr e) {
|
||||
e instanceof NullLiteral or
|
||||
e.(GlobalVarAccess).getName() = "undefined" or
|
||||
e.(NumberLiteral).getIntValue() = 0 or
|
||||
e.(UnaryExpr).getOperator() = "void"
|
||||
e instanceof VoidExpr
|
||||
) and
|
||||
// exclude the first statement of a try block
|
||||
not e = any(TryStmt stmt).getBody().getStmt(0).(ExprStmt).getExpr() and
|
||||
|
||||
Reference in New Issue
Block a user