mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Update javascript/ql/src/semmle/javascript/Expr.qll
Co-Authored-By: psygnisfive <psygnisfive@users.noreply.github.com>
This commit is contained in:
@@ -180,7 +180,7 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
|
||||
not ctx instanceof EqualityTest and // x EQOP y is fine because of implicit conversion and lack thereof
|
||||
not ctx.(BitOrExpr).getAnOperand().(NumberLiteral).getIntValue() = 0 and // x | 0 is fine because it's used to convert to numbers
|
||||
not ctx.(RShiftExpr).getRightOperand().(NumberLiteral).getIntValue() = 0 and // x >> 0 is fine because it's used to convert to numbers
|
||||
not ctx.(URShiftExpr).getRightOperand().(NumberLiteral).getIntValue() = 0 // x >> 0 is fine because it's used to convert to numbers
|
||||
not ctx.(URShiftExpr).getRightOperand().(NumberLiteral).getIntValue() = 0 // x >>> 0 is fine because it's used to convert to numbers
|
||||
or
|
||||
this = ctx.(UnaryExpr).getOperand() and
|
||||
not ctx instanceof LogNotExpr and // !x is fine because of implicit conversion
|
||||
|
||||
Reference in New Issue
Block a user