mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
JS: Ignore strict-mode-call-stack-introspection for expr stmts
This commit is contained in:
@@ -32,5 +32,6 @@ where
|
||||
acc.accesses(baseNode.asExpr(), prop) and
|
||||
acc.getContainer().isStrict() and
|
||||
illegalPropAccess(baseNode.getAValue(), base, prop) and
|
||||
forex(AbstractValue av | av = baseNode.getAValue() | illegalPropAccess(av, _, prop))
|
||||
forex(AbstractValue av | av = baseNode.getAValue() | illegalPropAccess(av, _, prop)) and
|
||||
not acc = any(ExprStmt stmt).getExpr() // reported by js/useless-expression
|
||||
select acc, "Strict mode code cannot use " + base + "." + prop + "."
|
||||
|
||||
Reference in New Issue
Block a user