mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
cache RegExpCreationNode::getAReference
This commit is contained in:
@@ -1650,5 +1650,9 @@ class RegExpCreationNode extends DataFlow::SourceNode {
|
||||
}
|
||||
|
||||
/** Gets a data flow node referring to this regular expression. */
|
||||
DataFlow::SourceNode getAReference() { result = this.getAReference(DataFlow::TypeTracker::end()) }
|
||||
cached
|
||||
DataFlow::SourceNode getAReference() {
|
||||
Stages::FlowSteps::ref() and
|
||||
result = this.getAReference(DataFlow::TypeTracker::end())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,6 +238,8 @@ module Stages {
|
||||
AccessPath::DominatingPaths::hasDominatingWrite(_)
|
||||
or
|
||||
DataFlow::SharedFlowStep::step(_, _)
|
||||
or
|
||||
exists(any(DataFlow::RegExpCreationNode e).getAReference())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user