Merge pull request #5000 from erik-krogh/redosOnlyNonMin

Approved by esbena
This commit is contained in:
CodeQL CI
2021-01-21 15:29:03 -08:00
committed by GitHub

View File

@@ -112,7 +112,9 @@ class RegExpRoot extends RegExpTerm {
// there are no lookbehinds // there are no lookbehinds
not exists(RegExpLookbehind lbh | getRoot(lbh) = this) and not exists(RegExpLookbehind lbh | getRoot(lbh) = this) and
// is actually used as a RegExp // is actually used as a RegExp
isUsedAsRegExp() isUsedAsRegExp() and
// pragmatic performance optimization: ignore minified files.
not getRootTerm().getParent().(Expr).getTopLevel().isMinified()
} }
} }