Dataflow: Add support for C#/Python/Ruby/Swift.

This commit is contained in:
Anders Schack-Mulligen
2022-10-13 14:29:27 +02:00
parent 69bf13b1d4
commit f1634d3dca
8 changed files with 24 additions and 1 deletions

View File

@@ -1581,6 +1581,8 @@ predicate jumpStep(Node pred, Node succ) {
jrk.getTarget() = call.getATarget(_) and
succ = getAnOutNode(call, jrk.getTargetReturnKind())
)
or
FlowSummaryImpl::Private::Steps::summaryJumpStep(pred, succ)
}
private class StoreStepConfiguration extends ControlFlowReachabilityConfiguration {

View File

@@ -91,6 +91,12 @@ DataFlowType getCallbackReturnType(DataFlowType t, ReturnKind rk) {
)
}
/** Gets the type of synthetic global `sg`. */
DataFlowType getSyntheticGlobalType(SummaryComponent::SyntheticGlobal sg) {
exists(sg) and
result = Gvn::getGlobalValueNumber(any(ObjectType t))
}
bindingset[provenance]
private boolean isGenerated(string provenance) {
provenance = "generated" and result = true