mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
JavaScript: Lift call graph library to data flow graph.
This commit is contained in:
@@ -121,8 +121,7 @@ predicate noSideEffects(Expr e) {
|
||||
e.isPure()
|
||||
or
|
||||
// `new Error(...)`, `new SyntaxError(...)`, etc.
|
||||
e instanceof NewExpr and
|
||||
forex (Function f | f = e.(CallSite).getACallee() |
|
||||
forex (Function f | f = e.flow().(DataFlow::NewNode).getACallee() |
|
||||
f.(ExternalType).getASupertype*().getName() = "Error"
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user