JS: use RegExpLiteral as a SourceNode

This commit is contained in:
Esben Sparre Andreasen
2019-03-22 08:02:39 +01:00
parent 7923c9d77c
commit 364ba1b4ac
8 changed files with 16 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ import javascript
*/
predicate matchesString(Expr e, string s) {
exists(RegExpLiteral rl |
rl = e and
rl.flow().(DataFlow::SourceNode).flowsToExpr(e) and
not rl.isIgnoreCase() and
regExpMatchesString(rl.getRoot(), s)
)