JavaScript: Lift call graph library to data flow graph.

This commit is contained in:
Max Schaefer
2018-07-09 09:07:42 +01:00
parent d91218e248
commit 9ba3d80bad
53 changed files with 761 additions and 115 deletions

View File

@@ -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"
)
}